2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2016-06-05 23:56:11 +03:00
|
|
|
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!()
|
|
|
|
}
|
|
|
|
}
|