]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/issue-46099-move-in-macro.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / moves / issue-46099-move-in-macro.rs
1 // Regression test for issue #46099
2 // Tests that we don't emit spurious
3 // 'value moved in previous iteration of loop' message
4
5 macro_rules! test {
6     ($v:expr) => {{
7         drop(&$v);
8         $v
9     }}
10 }
11
12 fn main() {
13     let b = Box::new(true);
14     test!({b}); //~ ERROR use of moved value
15 }