2016-05-24 16:24:44 -05:00
|
|
|
struct Slice<T> {
|
|
|
|
data: *const T,
|
|
|
|
len: usize,
|
|
|
|
}
|
2014-08-17 08:30:59 -05:00
|
|
|
|
|
|
|
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 `()`
|
2019-11-13 16:16:56 -06:00
|
|
|
//~| found struct `Slice<_>`
|
2023-01-02 20:00:33 -06:00
|
|
|
//~| expected `()`, found `Slice<_>`
|
2014-08-17 08:30:59 -05:00
|
|
|
_ => unreachable!()
|
|
|
|
}
|
|
|
|
}
|