You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macro_rules! test {($v:expr) => {{
drop(&$v);
$v
}}}fnmain(){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
Test case:
Produces: