]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/issue-30240-rpass.rs
Auto merge of #78682 - glandium:issue78471, r=lcnr
[rust.git] / src / test / ui / pattern / usefulness / issue-30240-rpass.rs
1 // run-pass
2 fn main() {
3     let &ref a = &[0i32] as &[_];
4     assert_eq!(a, &[0i32] as &[_]);
5
6     let &ref a = "hello";
7     assert_eq!(a, "hello");
8
9     match "foo" {
10         "fool" => unreachable!(),
11         "foo" => {},
12         ref _x => unreachable!()
13     }
14 }