mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
23 lines
285 B
Rust
23 lines
285 B
Rust
//@ 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;
|
|
});
|
|
}
|