about summary refs log tree commit diff
path: root/tests/ui/match/struct-reference-patterns-12285.rs
blob: 246e230b0de74a56ed2d88a1e6e775927ed32c0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Regression test for https://github.com/rust-lang/rust/issues/12285

//@ run-pass

struct S;

fn main() {
    match Some(&S) {
        Some(&S) => {},
        _x => unreachable!()
    }
    match Some(&S) {
        Some(&S) => {},
        None => unreachable!()
    }
}