fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
806 B20 linesraw
1error[E0382]: borrow of moved value: `x`
2  --> $DIR/liveness-use-after-move.rs:6:20
3   |
4LL |     let x: Box<_> = 5.into();
5   |         - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
6LL |     let y = x;
7   |             - value moved here
8LL |
9LL |     println!("{}", *x);
10   |                    ^^ value borrowed here after move
11   |
12   = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
13help: consider cloning the value if the performance cost is acceptable
14   |
15LL |     let y = x.clone();
16   |              ++++++++
17
18error: aborting due to previous error
19
20For more information about this error, try `rustc --explain E0382`.