diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-23311.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-23311.rs b/src/test/ui/issues/issue-23311.rs new file mode 100644 index 000000000..62c96840b --- /dev/null +++ b/src/test/ui/issues/issue-23311.rs @@ -0,0 +1,11 @@ +// run-pass + +// Test that we do not ICE when pattern matching an array against a slice. + +fn main() { + match "foo".as_bytes() { + b"food" => (), + &[b'f', ..] => (), + _ => () + } +} |