Skip to content

Commit c32e2fe

Browse files
committed
add test for #109812
1 parent c968b8b commit c32e2fe

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/crashes/109812.rs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//@ known-bug: #109812
2+
3+
#![warn(rust_2021_incompatible_closure_captures)]
4+
5+
enum Either {
6+
One(X),
7+
Two(X),
8+
}
9+
10+
struct X(Y);
11+
12+
struct Y;
13+
14+
fn move_into_fnmut() {
15+
let x = X(Y);
16+
17+
consume_fnmut(|| {
18+
let Either::Two(ref mut _t) = x;
19+
20+
let X(mut _t) = x;
21+
});
22+
}

0 commit comments

Comments
 (0)