mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
16 lines
325 B
Rust
16 lines
325 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 struct `Slice`
|
|
_ => unreachable!()
|
|
}
|
|
}
|