summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/issue-30240-rpass.rs
blob: ab16614fd3084678ecd8c71ab8bc8cab8f0f86ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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!()
    }
}