]>
git.proxmox.com Git - rustc.git/blob - tests/ui/array-slice-vec/issue-69103-extra-binding-subslice.rs
1 // We used to not lower the extra `b @ ..` into `b @ _` which meant that no type
2 // was registered for the binding `b` although it passed through resolve.
3 // This resulted in an ICE (#69103).
6 let [a @
.., b @
..] = &mut [1, 2];
7 //~^ ERROR `..` can only be used once per slice pattern
10 let [.., c @
..] = [1, 2];
11 //~^ ERROR `..` can only be used once per slice pattern
14 // This never ICEd, but let's make sure it won't regress either.
15 let (.., d @
..) = (1, 2);
16 //~^ ERROR `..` patterns are not allowed here