@@ -36,37 +36,37 @@ LL | fn cycle1() -> impl Clone {
36
36
| ^^^^^^^^^^^^^^^^^^^^^^^^^
37
37
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
38
38
note: ...which requires computing type of `cycle2::{{opaque}}#0`...
39
- --> $DIR/auto-trait-leak.rs:22 :16
39
+ --> $DIR/auto-trait-leak.rs:20 :16
40
40
|
41
41
LL | fn cycle2() -> impl Clone {
42
42
| ^^^^^^^^^^
43
43
note: ...which requires borrow-checking `cycle2`...
44
- --> $DIR/auto-trait-leak.rs:22 :1
44
+ --> $DIR/auto-trait-leak.rs:20 :1
45
45
|
46
46
LL | fn cycle2() -> impl Clone {
47
47
| ^^^^^^^^^^^^^^^^^^^^^^^^^
48
48
note: ...which requires processing `cycle2`...
49
- --> $DIR/auto-trait-leak.rs:22 :1
49
+ --> $DIR/auto-trait-leak.rs:20 :1
50
50
|
51
51
LL | fn cycle2() -> impl Clone {
52
52
| ^^^^^^^^^^^^^^^^^^^^^^^^^
53
53
note: ...which requires processing MIR for `cycle2`...
54
- --> $DIR/auto-trait-leak.rs:22 :1
54
+ --> $DIR/auto-trait-leak.rs:20 :1
55
55
|
56
56
LL | fn cycle2() -> impl Clone {
57
57
| ^^^^^^^^^^^^^^^^^^^^^^^^^
58
58
note: ...which requires unsafety-checking `cycle2`...
59
- --> $DIR/auto-trait-leak.rs:22 :1
59
+ --> $DIR/auto-trait-leak.rs:20 :1
60
60
|
61
61
LL | fn cycle2() -> impl Clone {
62
62
| ^^^^^^^^^^^^^^^^^^^^^^^^^
63
63
note: ...which requires building MIR for `cycle2`...
64
- --> $DIR/auto-trait-leak.rs:22 :1
64
+ --> $DIR/auto-trait-leak.rs:20 :1
65
65
|
66
66
LL | fn cycle2() -> impl Clone {
67
67
| ^^^^^^^^^^^^^^^^^^^^^^^^^
68
68
note: ...which requires type-checking `cycle2`...
69
- --> $DIR/auto-trait-leak.rs:22 :1
69
+ --> $DIR/auto-trait-leak.rs:20 :1
70
70
|
71
71
LL | fn cycle2() -> impl Clone {
72
72
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -84,178 +84,8 @@ LL | | Rc::new(String::from("foo"))
84
84
LL | | }
85
85
| |_^
86
86
87
- error[E0391]: cycle detected when computing type of `cycle1::{{opaque}}#0`
88
- --> $DIR/auto-trait-leak.rs:12:16
89
- |
90
- LL | fn cycle1() -> impl Clone {
91
- | ^^^^^^^^^^
92
- |
93
- note: ...which requires borrow-checking `cycle1`...
94
- --> $DIR/auto-trait-leak.rs:12:1
95
- |
96
- LL | fn cycle1() -> impl Clone {
97
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
98
- note: ...which requires processing `cycle1`...
99
- --> $DIR/auto-trait-leak.rs:12:1
100
- |
101
- LL | fn cycle1() -> impl Clone {
102
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
103
- note: ...which requires processing MIR for `cycle1`...
104
- --> $DIR/auto-trait-leak.rs:12:1
105
- |
106
- LL | fn cycle1() -> impl Clone {
107
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
108
- note: ...which requires unsafety-checking `cycle1`...
109
- --> $DIR/auto-trait-leak.rs:12:1
110
- |
111
- LL | fn cycle1() -> impl Clone {
112
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
113
- note: ...which requires building MIR for `cycle1`...
114
- --> $DIR/auto-trait-leak.rs:12:1
115
- |
116
- LL | fn cycle1() -> impl Clone {
117
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
118
- note: ...which requires type-checking `cycle1`...
119
- --> $DIR/auto-trait-leak.rs:12:1
120
- |
121
- LL | fn cycle1() -> impl Clone {
122
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
123
- = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
124
- note: ...which requires computing type of `cycle2::{{opaque}}#0`...
125
- --> $DIR/auto-trait-leak.rs:22:16
126
- |
127
- LL | fn cycle2() -> impl Clone {
128
- | ^^^^^^^^^^
129
- note: ...which requires borrow-checking `cycle2`...
130
- --> $DIR/auto-trait-leak.rs:22:1
131
- |
132
- LL | fn cycle2() -> impl Clone {
133
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
134
- note: ...which requires processing `cycle2`...
135
- --> $DIR/auto-trait-leak.rs:22:1
136
- |
137
- LL | fn cycle2() -> impl Clone {
138
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
139
- note: ...which requires processing MIR for `cycle2`...
140
- --> $DIR/auto-trait-leak.rs:22:1
141
- |
142
- LL | fn cycle2() -> impl Clone {
143
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
144
- note: ...which requires unsafety-checking `cycle2`...
145
- --> $DIR/auto-trait-leak.rs:22:1
146
- |
147
- LL | fn cycle2() -> impl Clone {
148
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
149
- note: ...which requires building MIR for `cycle2`...
150
- --> $DIR/auto-trait-leak.rs:22:1
151
- |
152
- LL | fn cycle2() -> impl Clone {
153
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
154
- note: ...which requires type-checking `cycle2`...
155
- --> $DIR/auto-trait-leak.rs:22:1
156
- |
157
- LL | fn cycle2() -> impl Clone {
158
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
159
- = note: ...which again requires computing type of `cycle1::{{opaque}}#0`, completing the cycle
160
- note: cycle used when checking item types in top-level module
161
- --> $DIR/auto-trait-leak.rs:1:1
162
- |
163
- LL | / use std::cell::Cell;
164
- LL | | use std::rc::Rc;
165
- LL | |
166
- LL | | fn send<T: Send>(_: T) {}
167
- ... |
168
- LL | | Rc::new(String::from("foo"))
169
- LL | | }
170
- | |_^
171
-
172
- error[E0391]: cycle detected when computing type of `cycle1::{{opaque}}#0`
173
- --> $DIR/auto-trait-leak.rs:12:16
174
- |
175
- LL | fn cycle1() -> impl Clone {
176
- | ^^^^^^^^^^
177
- |
178
- note: ...which requires borrow-checking `cycle1`...
179
- --> $DIR/auto-trait-leak.rs:12:1
180
- |
181
- LL | fn cycle1() -> impl Clone {
182
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
183
- note: ...which requires processing `cycle1`...
184
- --> $DIR/auto-trait-leak.rs:12:1
185
- |
186
- LL | fn cycle1() -> impl Clone {
187
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
188
- note: ...which requires processing MIR for `cycle1`...
189
- --> $DIR/auto-trait-leak.rs:12:1
190
- |
191
- LL | fn cycle1() -> impl Clone {
192
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
193
- note: ...which requires unsafety-checking `cycle1`...
194
- --> $DIR/auto-trait-leak.rs:12:1
195
- |
196
- LL | fn cycle1() -> impl Clone {
197
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
198
- note: ...which requires building MIR for `cycle1`...
199
- --> $DIR/auto-trait-leak.rs:12:1
200
- |
201
- LL | fn cycle1() -> impl Clone {
202
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
203
- note: ...which requires type-checking `cycle1`...
204
- --> $DIR/auto-trait-leak.rs:12:1
205
- |
206
- LL | fn cycle1() -> impl Clone {
207
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
208
- = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
209
- note: ...which requires computing type of `cycle2::{{opaque}}#0`...
210
- --> $DIR/auto-trait-leak.rs:22:16
211
- |
212
- LL | fn cycle2() -> impl Clone {
213
- | ^^^^^^^^^^
214
- note: ...which requires borrow-checking `cycle2`...
215
- --> $DIR/auto-trait-leak.rs:22:1
216
- |
217
- LL | fn cycle2() -> impl Clone {
218
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
219
- note: ...which requires processing `cycle2`...
220
- --> $DIR/auto-trait-leak.rs:22:1
221
- |
222
- LL | fn cycle2() -> impl Clone {
223
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
224
- note: ...which requires processing MIR for `cycle2`...
225
- --> $DIR/auto-trait-leak.rs:22:1
226
- |
227
- LL | fn cycle2() -> impl Clone {
228
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
229
- note: ...which requires unsafety-checking `cycle2`...
230
- --> $DIR/auto-trait-leak.rs:22:1
231
- |
232
- LL | fn cycle2() -> impl Clone {
233
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
234
- note: ...which requires building MIR for `cycle2`...
235
- --> $DIR/auto-trait-leak.rs:22:1
236
- |
237
- LL | fn cycle2() -> impl Clone {
238
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
239
- note: ...which requires type-checking `cycle2`...
240
- --> $DIR/auto-trait-leak.rs:22:1
241
- |
242
- LL | fn cycle2() -> impl Clone {
243
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
244
- = note: ...which again requires computing type of `cycle1::{{opaque}}#0`, completing the cycle
245
- note: cycle used when checking item types in top-level module
246
- --> $DIR/auto-trait-leak.rs:1:1
247
- |
248
- LL | / use std::cell::Cell;
249
- LL | | use std::rc::Rc;
250
- LL | |
251
- LL | | fn send<T: Send>(_: T) {}
252
- ... |
253
- LL | | Rc::new(String::from("foo"))
254
- LL | | }
255
- | |_^
256
-
257
87
error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
258
- --> $DIR/auto-trait-leak.rs:16 :5
88
+ --> $DIR/auto-trait-leak.rs:14 :5
259
89
|
260
90
LL | fn send<T: Send>(_: T) {}
261
91
| ---- required by this bound in `send`
@@ -269,7 +99,7 @@ LL | fn cycle2() -> impl Clone {
269
99
= help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>`
270
100
= note: required because it appears within the type `impl std::clone::Clone`
271
101
272
- error: aborting due to 4 previous errors
102
+ error: aborting due to 2 previous errors
273
103
274
104
Some errors have detailed explanations: E0277, E0391.
275
105
For more information about an error, try `rustc --explain E0277`.
0 commit comments