]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-51512.stderr
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
[rust.git] / src / test / ui / nll / issue-51512.stderr
1 error[E0382]: use of moved value: `range`
2   --> $DIR/issue-51512.rs:4:13
3    |
4 LL |     let range = 0..1;
5    |         ----- move occurs because `range` has type `std::ops::Range<i32>`, which does not implement the `Copy` trait
6 LL |     let r = range;
7    |             ----- value moved here
8 LL |     let x = range.start;
9    |             ^^^^^^^^^^^ value used here after move
10    |
11 help: consider cloning the value if the performance cost is acceptable
12    |
13 LL |     let r = range.clone();
14    |                  ++++++++
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0382`.