mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 08:18:44 +00:00
15 lines
265 B
Rust
15 lines
265 B
Rust
//@ run-pass
|
|
fn main() {
|
|
let &ref a = &[0i32] as &[_];
|
|
assert_eq!(a, &[0i32] as &[_]);
|
|
|
|
let &ref a = "hello";
|
|
assert_eq!(a, "hello");
|
|
|
|
match "foo" {
|
|
"fool" => unreachable!(),
|
|
"foo" => {},
|
|
ref _x => unreachable!()
|
|
}
|
|
}
|