diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/pattern/usefulness/match-byte-array-patterns-2.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/pattern/usefulness/match-byte-array-patterns-2.rs b/src/test/ui/pattern/usefulness/match-byte-array-patterns-2.rs new file mode 100644 index 000000000..33468d03f --- /dev/null +++ b/src/test/ui/pattern/usefulness/match-byte-array-patterns-2.rs @@ -0,0 +1,13 @@ +fn main() { + let buf = &[0, 1, 2, 3]; + + match buf { //~ ERROR non-exhaustive + b"AAAA" => {} + } + + let buf: &[u8] = buf; + + match buf { //~ ERROR non-exhaustive + b"AAAA" => {} + } +} |