|
| 1 | +error[E0382]: use of moved value: `file` |
| 2 | + --> $DIR/std_impls.rs:9:12 |
| 3 | + | |
| 4 | +LL | let file = File::open("foo.txt").unwrap(); |
| 5 | + | ---- move occurs because `file` has type `File`, which does not implement the `Copy` trait |
| 6 | +LL | (file, file); |
| 7 | + | ---- ^^^^ value used here after move |
| 8 | + | | |
| 9 | + | value moved here |
| 10 | + | |
| 11 | + = note: you can use `File::try_clone` to duplicate a `File` instance |
| 12 | + |
| 13 | +error[E0382]: the type `Arc` does not implement `Copy` |
| 14 | + --> $DIR/std_impls.rs:15:11 |
| 15 | + | |
| 16 | +LL | let arc = Arc::new(42); |
| 17 | + | --- this move could be avoided by cloning the original `Arc`, which is inexpensive |
| 18 | +LL | |
| 19 | +LL | (arc, arc); |
| 20 | + | --- ^^^ value used here after move |
| 21 | + | | |
| 22 | + | value moved here |
| 23 | + | |
| 24 | + = note: consider using `Arc::clone` |
| 25 | +help: clone the value to increment its reference count |
| 26 | + | |
| 27 | +LL | (arc.clone(), arc); |
| 28 | + | ++++++++ |
| 29 | + |
| 30 | +error[E0382]: the type `Rc` does not implement `Copy` |
| 31 | + --> $DIR/std_impls.rs:22:10 |
| 32 | + | |
| 33 | +LL | let rc = Rc::new(12); |
| 34 | + | -- this move could be avoided by cloning the original `Rc`, which is inexpensive |
| 35 | +LL | |
| 36 | +LL | (rc, rc); |
| 37 | + | -- ^^ value used here after move |
| 38 | + | | |
| 39 | + | value moved here |
| 40 | + | |
| 41 | + = note: consider using `Rc::clone` |
| 42 | +help: clone the value to increment its reference count |
| 43 | + | |
| 44 | +LL | (rc.clone(), rc); |
| 45 | + | ++++++++ |
| 46 | + |
| 47 | +error: aborting due to 3 previous errors |
| 48 | + |
| 49 | +For more information about this error, try `rustc --explain E0382`. |
0 commit comments