Skip to content

Commit ca1d29c

Browse files
committed
Add another test for issue #31856
1 parent 974f1ef commit ca1d29c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/test/compile-fail/issue-32922.rs

+10
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,18 @@ macro_rules! bar { // test issue #31856
2424
)
2525
}
2626

27+
macro_rules! baz {
28+
($i:ident) => {
29+
let mut $i = 2;
30+
$i = $i + 1;
31+
}
32+
}
33+
2734
#[rustc_error]
2835
fn main() { //~ ERROR compilation successful
2936
foo! {};
3037
bar! {};
38+
39+
let mut a = true;
40+
baz!(a);
3141
}

0 commit comments

Comments
 (0)