rust/tests/ui/issues/issue-16401.rs

16 lines
321 B
Rust
Raw Normal View History

struct Slice<T> {
data: *const T,
len: usize,
}
fn main() {
match () {
Slice { data: data, len: len } => (),
2015-01-12 00:01:44 -06:00
//~^ ERROR mismatched types
2019-11-14 16:08:08 -06:00
//~| expected unit type `()`
//~| found struct `Slice<_>`
//~| expected `()`, found `Slice<_>`
_ => unreachable!()
}
}