11error[E0382]: use of moved value: `t`
2- --> $DIR/use_of_moved_value_copy_suggestions.rs:2 :9
2+ --> $DIR/use_of_moved_value_copy_suggestions.rs:6 :9
33 |
44LL | fn duplicate_t<T>(t: T) -> (T, T) {
55 | - move occurs because `t` has type `T`, which does not implement the `Copy` trait
6+ LL |
67LL | (t, t)
78 | - ^ value used here after move
89 | |
@@ -14,10 +15,11 @@ LL | fn duplicate_t<T: Copy>(t: T) -> (T, T) {
1415 | ++++++
1516
1617error[E0382]: use of moved value: `t`
17- --> $DIR/use_of_moved_value_copy_suggestions.rs:6 :9
18+ --> $DIR/use_of_moved_value_copy_suggestions.rs:11 :9
1819 |
1920LL | fn duplicate_opt<T>(t: Option<T>) -> (Option<T>, Option<T>) {
2021 | - move occurs because `t` has type `Option<T>`, which does not implement the `Copy` trait
22+ LL |
2123LL | (t, t)
2224 | - ^ value used here after move
2325 | |
@@ -29,10 +31,11 @@ LL | fn duplicate_opt<T: Copy>(t: Option<T>) -> (Option<T>, Option<T>) {
2931 | ++++++
3032
3133error[E0382]: use of moved value: `t`
32- --> $DIR/use_of_moved_value_copy_suggestions.rs:10 :9
34+ --> $DIR/use_of_moved_value_copy_suggestions.rs:16 :9
3335 |
3436LL | fn duplicate_tup1<T>(t: (T,)) -> ((T,), (T,)) {
3537 | - move occurs because `t` has type `(T,)`, which does not implement the `Copy` trait
38+ LL |
3639LL | (t, t)
3740 | - ^ value used here after move
3841 | |
@@ -44,10 +47,11 @@ LL | fn duplicate_tup1<T: Copy>(t: (T,)) -> ((T,), (T,)) {
4447 | ++++++
4548
4649error[E0382]: use of moved value: `t`
47- --> $DIR/use_of_moved_value_copy_suggestions.rs:14 :9
50+ --> $DIR/use_of_moved_value_copy_suggestions.rs:21 :9
4851 |
4952LL | fn duplicate_tup2<A, B>(t: (A, B)) -> ((A, B), (A, B)) {
5053 | - move occurs because `t` has type `(A, B)`, which does not implement the `Copy` trait
54+ LL |
5155LL | (t, t)
5256 | - ^ value used here after move
5357 | |
@@ -59,10 +63,11 @@ LL | fn duplicate_tup2<A: Copy, B: Copy>(t: (A, B)) -> ((A, B), (A, B)) {
5963 | ++++++ ++++++
6064
6165error[E0382]: use of moved value: `t`
62- --> $DIR/use_of_moved_value_copy_suggestions.rs:18 :9
66+ --> $DIR/use_of_moved_value_copy_suggestions.rs:26 :9
6367 |
6468LL | fn duplicate_custom<T>(t: S<T>) -> (S<T>, S<T>) {
6569 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
70+ LL |
6671LL | (t, t)
6772 | - ^ value used here after move
6873 | |
@@ -74,10 +79,11 @@ LL | fn duplicate_custom<T: Trait + Copy>(t: S<T>) -> (S<T>, S<T>) {
7479 | ++++++++++++++
7580
7681error[E0382]: use of moved value: `t`
77- --> $DIR/use_of_moved_value_copy_suggestions.rs:35 :9
82+ --> $DIR/use_of_moved_value_copy_suggestions.rs:44 :9
7883 |
7984LL | fn duplicate_custom_1<T>(t: S<T>) -> (S<T>, S<T>) where {
8085 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
86+ LL |
8187LL | (t, t)
8288 | - ^ value used here after move
8389 | |
@@ -89,7 +95,7 @@ LL | fn duplicate_custom_1<T: Trait + Copy>(t: S<T>) -> (S<T>, S<T>) where {
8995 | ++++++++++++++
9096
9197error[E0382]: use of moved value: `t`
92- --> $DIR/use_of_moved_value_copy_suggestions.rs:42 :9
98+ --> $DIR/use_of_moved_value_copy_suggestions.rs:52 :9
9399 |
94100LL | fn duplicate_custom_2<T>(t: S<T>) -> (S<T>, S<T>)
95101 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
@@ -105,7 +111,7 @@ LL | T: A + Trait + Copy,
105111 | ++++++++++++++
106112
107113error[E0382]: use of moved value: `t`
108- --> $DIR/use_of_moved_value_copy_suggestions.rs:50 :9
114+ --> $DIR/use_of_moved_value_copy_suggestions.rs:61 :9
109115 |
110116LL | fn duplicate_custom_3<T>(t: S<T>) -> (S<T>, S<T>)
111117 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
@@ -121,7 +127,7 @@ LL | T: B, T: Trait, T: Copy
121127 | ~~~~~~~~~~~~~~~~~~~
122128
123129error[E0382]: use of moved value: `t`
124- --> $DIR/use_of_moved_value_copy_suggestions.rs:57 :9
130+ --> $DIR/use_of_moved_value_copy_suggestions.rs:69 :9
125131 |
126132LL | fn duplicate_custom_4<T: A>(t: S<T>) -> (S<T>, S<T>)
127133 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
@@ -136,16 +142,6 @@ help: consider further restricting this bound
136142LL | T: B + Trait + Copy,
137143 | ++++++++++++++
138144
139- error[E0382]: use of moved value: `t`
140- --> $DIR/use_of_moved_value_copy_suggestions.rs:62:9
141- |
142- LL | fn duplicate_rc<T>(t: std::rc::Rc<T>) -> (std::rc::Rc<T>, std::rc::Rc<T>) {
143- | - move occurs because `t` has type `Rc<T>`, which does not implement the `Copy` trait
144- LL | (t, t)
145- | - ^ value used here after move
146- | |
147- | value moved here
148-
149- error: aborting due to 10 previous errors
145+ error: aborting due to 9 previous errors
150146
151147For more information about this error, try `rustc --explain E0382`.
0 commit comments