summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-16401.rs
blob: 332352ca727ac2f0ccdd366b6cbfad529dbdd598 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
struct Slice<T> {
    data: *const T,
    len: usize,
}

fn main() {
    match () {
        Slice { data: data, len: len } => (),
        //~^ ERROR mismatched types
        //~| expected unit type `()`
        //~| found struct `Slice<_>`
        //~| expected `()`, found struct `Slice`
        _ => unreachable!()
    }
}