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