mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
62ba3e70a1
The previous output was unintuitive to users.
16 lines
321 B
Rust
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!()
|
|
}
|
|
}
|