]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs
Auto merge of #85746 - m-ou-se:io-error-other, r=joshtriplett
[rust.git] / src / test / ui / rfc-2361-dbg-macro / dbg-macro-move-semantics.rs
1 // Test ensuring that `dbg!(expr)` will take ownership of the argument.
2
3 #[derive(Debug)]
4 struct NoCopy(usize);
5
6 fn main() {
7     let a = NoCopy(0);
8     let _ = dbg!(a);
9     let _ = dbg!(a); //~ ERROR use of moved value
10 }