]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.rs
Rollup merge of #106714 - Ezrashaw:remove-e0490, r=davidtwco
[rust.git] / tests / 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 }