]> git.lizzy.rs Git - rust.git/blob - src/test/ui/use/use-after-move-implicity-coerced-object.stderr
Rollup merge of #90782 - ricobbe:binutils-dlltool, r=michaelwoerister
[rust.git] / src / test / ui / use / use-after-move-implicity-coerced-object.stderr
1 error[E0382]: borrow of moved value: `n`
2   --> $DIR/use-after-move-implicity-coerced-object.rs:28:13
3    |
4 LL |     let n: Box<_> = Number { n: 42 }.into();
5    |         - move occurs because `n` has type `Box<Number>`, which does not implement the `Copy` trait
6 LL |     let mut l: Box<_> = List { list: Vec::new() }.into();
7 LL |     l.push(n);
8    |            - value moved here
9 LL | 
10 LL |     let x = n.to_string();
11    |             ^^^^^^^^^^^^^ value borrowed here after move
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0382`.