Closed
Description
Test case:
macro_rules! test {
($v:expr) => {{
drop(&$v);
$v
}}
}
fn main() {
let b = Box::new(true);
test!({b});
}
Produces:
error[E0382]: use of moved value: `b`
--> src/main.rs:10:12
|
10 | test!({b});
| ^ value moved here in previous iteration of loop
|
= note: move occurs because `b` has type `std::boxed::Box<bool>`, which does not implement the `Copy` trait