rust/tests/ui/issues/issue-16401.rs
Esteban Küber 62ba3e70a1 Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00

16 lines
321 B
Rust

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 `Slice<_>`
_ => unreachable!()
}
}