about summary refs log tree commit diff
path: root/tests/ui/issues/issue-16401.rs
blob: 0985a6806d26002705c85dab2d0161eb2c8dc259 (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 () { //~ NOTE this expression has type `()`
        Slice { data: data, len: len } => (),
        //~^ ERROR mismatched types
        //~| NOTE expected unit type `()`
        //~| NOTE found struct `Slice<_>`
        //~| NOTE expected `()`, found `Slice<_>`
        _ => unreachable!()
    }
}