fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
575 B14 linesraw
1error[E0382]: borrow of moved value: `n`
2  --> $DIR/use-after-move-implicity-coerced-object.rs:28:13
3   |
4LL |     let n: Box<_> = box Number { n: 42 };
5   |         - move occurs because `n` has type `std::boxed::Box<Number>`, which does not implement the `Copy` trait
6LL |     let mut l: Box<_> = box List { list: Vec::new() };
7LL |     l.push(n);
8   |            - value moved here
9LL |     let x = n.to_string();
10   |             ^ value borrowed here after move
11
12error: aborting due to previous error
13
14For more information about this error, try `rustc --explain E0382`.