add test for https://github.com/rust-lang/rust/issues/109812
This commit is contained in:
parent
c968b8b777
commit
c32e2fe179
22
tests/crashes/109812.rs
Normal file
22
tests/crashes/109812.rs
Normal file
@ -0,0 +1,22 @@
|
||||
//@ known-bug: #109812
|
||||
|
||||
#![warn(rust_2021_incompatible_closure_captures)]
|
||||
|
||||
enum Either {
|
||||
One(X),
|
||||
Two(X),
|
||||
}
|
||||
|
||||
struct X(Y);
|
||||
|
||||
struct Y;
|
||||
|
||||
fn move_into_fnmut() {
|
||||
let x = X(Y);
|
||||
|
||||
consume_fnmut(|| {
|
||||
let Either::Two(ref mut _t) = x;
|
||||
|
||||
let X(mut _t) = x;
|
||||
});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user