diff options
Diffstat (limited to 'src/test/ui/issues/issue-16338.rs')
-rw-r--r-- | src/test/ui/issues/issue-16338.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-16338.rs b/src/test/ui/issues/issue-16338.rs new file mode 100644 index 000000000..321b3576c --- /dev/null +++ b/src/test/ui/issues/issue-16338.rs @@ -0,0 +1,10 @@ +struct Slice<T> { + data: *const T, + len: usize, +} + +fn main() { + let Slice { data: data, len: len } = "foo"; + //~^ ERROR mismatched types + //~| found struct `Slice<_>` +} |