diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-15381.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-15381.rs b/src/test/ui/issues/issue-15381.rs new file mode 100644 index 000000000..392fb1b24 --- /dev/null +++ b/src/test/ui/issues/issue-15381.rs @@ -0,0 +1,8 @@ +fn main() { + let values: Vec<u8> = vec![1,2,3,4,5,6,7,8]; + + for &[x,y,z] in values.chunks(3).filter(|&xs| xs.len() == 3) { + //~^ ERROR refutable pattern in `for` loop binding: `&[]`, `&[_]`, `&[_, _]` and 1 more not + println!("y={}", y); + } +} |