]> git.proxmox.com Git - rustc.git/blob - tests/ui/moves/use_of_moved_value_copy_suggestions.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / moves / use_of_moved_value_copy_suggestions.stderr
1 error[E0382]: use of moved value: `t`
2 --> $DIR/use_of_moved_value_copy_suggestions.rs:6:9
3 |
4 LL | fn duplicate_t<T>(t: T) -> (T, T) {
5 | - move occurs because `t` has type `T`, which does not implement the `Copy` trait
6 LL |
7 LL | (t, t)
8 | - ^ value used here after move
9 | |
10 | value moved here
11 |
12 help: consider restricting type parameter `T`
13 |
14 LL | fn duplicate_t<T: Copy>(t: T) -> (T, T) {
15 | ++++++
16
17 error[E0382]: use of moved value: `t`
18 --> $DIR/use_of_moved_value_copy_suggestions.rs:11:9
19 |
20 LL | fn duplicate_opt<T>(t: Option<T>) -> (Option<T>, Option<T>) {
21 | - move occurs because `t` has type `Option<T>`, which does not implement the `Copy` trait
22 LL |
23 LL | (t, t)
24 | - ^ value used here after move
25 | |
26 | value moved here
27 |
28 help: consider restricting type parameter `T`
29 |
30 LL | fn duplicate_opt<T: Copy>(t: Option<T>) -> (Option<T>, Option<T>) {
31 | ++++++
32
33 error[E0382]: use of moved value: `t`
34 --> $DIR/use_of_moved_value_copy_suggestions.rs:16:9
35 |
36 LL | fn duplicate_tup1<T>(t: (T,)) -> ((T,), (T,)) {
37 | - move occurs because `t` has type `(T,)`, which does not implement the `Copy` trait
38 LL |
39 LL | (t, t)
40 | - ^ value used here after move
41 | |
42 | value moved here
43 |
44 help: consider restricting type parameter `T`
45 |
46 LL | fn duplicate_tup1<T: Copy>(t: (T,)) -> ((T,), (T,)) {
47 | ++++++
48
49 error[E0382]: use of moved value: `t`
50 --> $DIR/use_of_moved_value_copy_suggestions.rs:21:9
51 |
52 LL | fn duplicate_tup2<A, B>(t: (A, B)) -> ((A, B), (A, B)) {
53 | - move occurs because `t` has type `(A, B)`, which does not implement the `Copy` trait
54 LL |
55 LL | (t, t)
56 | - ^ value used here after move
57 | |
58 | value moved here
59 |
60 help: consider restricting type parameters
61 |
62 LL | fn duplicate_tup2<A: Copy, B: Copy>(t: (A, B)) -> ((A, B), (A, B)) {
63 | ++++++ ++++++
64
65 error[E0382]: use of moved value: `t`
66 --> $DIR/use_of_moved_value_copy_suggestions.rs:26:9
67 |
68 LL | fn duplicate_custom<T>(t: S<T>) -> (S<T>, S<T>) {
69 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
70 LL |
71 LL | (t, t)
72 | - ^ value used here after move
73 | |
74 | value moved here
75 |
76 help: consider restricting type parameter `T`
77 |
78 LL | fn duplicate_custom<T: Copy + Trait>(t: S<T>) -> (S<T>, S<T>) {
79 | ++++++++++++++
80
81 error[E0382]: use of moved value: `t`
82 --> $DIR/use_of_moved_value_copy_suggestions.rs:44:9
83 |
84 LL | fn duplicate_custom_1<T>(t: S<T>) -> (S<T>, S<T>) where {
85 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
86 LL |
87 LL | (t, t)
88 | - ^ value used here after move
89 | |
90 | value moved here
91 |
92 help: consider restricting type parameter `T`
93 |
94 LL | fn duplicate_custom_1<T: Copy + Trait>(t: S<T>) -> (S<T>, S<T>) where {
95 | ++++++++++++++
96
97 error[E0382]: use of moved value: `t`
98 --> $DIR/use_of_moved_value_copy_suggestions.rs:52:9
99 |
100 LL | fn duplicate_custom_2<T>(t: S<T>) -> (S<T>, S<T>)
101 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
102 ...
103 LL | (t, t)
104 | - ^ value used here after move
105 | |
106 | value moved here
107 |
108 help: consider further restricting this bound
109 |
110 LL | T: A + Copy + Trait,
111 | ++++++++++++++
112
113 error[E0382]: use of moved value: `t`
114 --> $DIR/use_of_moved_value_copy_suggestions.rs:61:9
115 |
116 LL | fn duplicate_custom_3<T>(t: S<T>) -> (S<T>, S<T>)
117 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
118 ...
119 LL | (t, t)
120 | - ^ value used here after move
121 | |
122 | value moved here
123 |
124 help: consider further restricting this bound
125 |
126 LL | T: A + Copy + Trait,
127 | ++++++++++++++
128
129 error[E0382]: use of moved value: `t`
130 --> $DIR/use_of_moved_value_copy_suggestions.rs:69:9
131 |
132 LL | fn duplicate_custom_4<T: A>(t: S<T>) -> (S<T>, S<T>)
133 | - move occurs because `t` has type `S<T>`, which does not implement the `Copy` trait
134 ...
135 LL | (t, t)
136 | - ^ value used here after move
137 | |
138 | value moved here
139 |
140 help: consider further restricting this bound
141 |
142 LL | fn duplicate_custom_4<T: A + Copy + Trait>(t: S<T>) -> (S<T>, S<T>)
143 | ++++++++++++++
144
145 error[E0382]: use of moved value: `t`
146 --> $DIR/use_of_moved_value_copy_suggestions.rs:75:9
147 |
148 LL | fn existing_colon<T:>(t: T) {
149 | - move occurs because `t` has type `T`, which does not implement the `Copy` trait
150 LL |
151 LL | [t, t];
152 | - ^ value used here after move
153 | |
154 | value moved here
155 |
156 help: consider restricting type parameter `T`
157 |
158 LL | fn existing_colon<T: Copy>(t: T) {
159 | ++++
160
161 error[E0382]: use of moved value: `t`
162 --> $DIR/use_of_moved_value_copy_suggestions.rs:83:9
163 |
164 LL | fn existing_colon_in_where<T>(t: T)
165 | - move occurs because `t` has type `T`, which does not implement the `Copy` trait
166 ...
167 LL | [t, t];
168 | - ^ value used here after move
169 | |
170 | value moved here
171 |
172 help: consider further restricting type parameter `T`
173 |
174 LL | T:, T: Copy
175 | ~~~~~~~~~
176
177 error: aborting due to 11 previous errors
178
179 For more information about this error, try `rustc --explain E0382`.