blob: 22e7951dbe3670d8229fd6cf6e8a655ac54dd452 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
error[E0382]: use of moved value: `t`
--> $DIR/use_of_moved_value_clone_suggestions.rs:3:9
|
LL | fn duplicate_rc<T>(t: std::rc::Rc<T>) -> (std::rc::Rc<T>, std::rc::Rc<T>) {
| - move occurs because `t` has type `Rc<T>`, which does not implement the `Copy` trait
LL | (t, t)
| - ^ value used here after move
| |
| value moved here
|
help: consider cloning the value if the performance cost is acceptable
|
LL | (t.clone(), t)
| ++++++++
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.
|