diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-16401.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-16401.rs b/src/test/ui/issues/issue-16401.rs new file mode 100644 index 000000000..332352ca7 --- /dev/null +++ b/src/test/ui/issues/issue-16401.rs @@ -0,0 +1,15 @@ +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!() + } +} |