move_ref_pattern: don't ICE on unreachable 2xby-move conflicts
This commit is contained in:
parent
0253f868ca
commit
8d4973f587
2 changed files with 15 additions and 3 deletions
|
|
@ -0,0 +1,15 @@
|
|||
// When conflicts between by-move bindings in `by_move_1 @ has_by_move` patterns
|
||||
// happen and that code is unreachable according to borrowck, we accept this code.
|
||||
// In particular, we want to ensure here that an ICE does not happen, which it did originally.
|
||||
|
||||
// check-pass
|
||||
|
||||
#![feature(move_ref_pattern)]
|
||||
#![feature(bindings_after_at)]
|
||||
|
||||
fn main() {
|
||||
return;
|
||||
|
||||
struct S;
|
||||
let a @ (b, c) = (S, S);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue