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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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 06:01:44 +00:00
//~^ ERROR mismatched types
2019-11-14 22:08:08 +00:00
//~| expected unit type `()`
//~| found struct `Slice<_>`
//~| expected `()`, found `Slice<_>`
_ => unreachable!()
}
}