]>
Commit | Line | Data |
---|---|---|
532ac7d7 | 1 | error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0` |
48663c56 | 2 | --> $DIR/auto-trait-leak.rs:12:16 |
ff7c6d11 | 3 | | |
94b46f34 XL |
4 | LL | fn cycle1() -> impl Clone { |
5 | | ^^^^^^^^^^ | |
ff7c6d11 | 6 | | |
74b04a01 XL |
7 | note: ...which requires borrow-checking `cycle1`... |
8 | --> $DIR/auto-trait-leak.rs:12:1 | |
9 | | | |
10 | LL | fn cycle1() -> impl Clone { | |
11 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
12 | note: ...which requires processing `cycle1`... | |
13 | --> $DIR/auto-trait-leak.rs:12:1 | |
14 | | | |
15 | LL | fn cycle1() -> impl Clone { | |
16 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
94b46f34 | 17 | note: ...which requires processing `cycle1`... |
48663c56 | 18 | --> $DIR/auto-trait-leak.rs:12:1 |
2c00a5a8 | 19 | | |
74b04a01 XL |
20 | LL | fn cycle1() -> impl Clone { |
21 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
22 | note: ...which requires unsafety-checking `cycle1`... | |
23 | --> $DIR/auto-trait-leak.rs:12:1 | |
24 | | | |
25 | LL | fn cycle1() -> impl Clone { | |
26 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
27 | note: ...which requires building MIR for... | |
28 | --> $DIR/auto-trait-leak.rs:12:1 | |
29 | | | |
30 | LL | fn cycle1() -> impl Clone { | |
31 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
32 | note: ...which requires type-checking `cycle1`... | |
33 | --> $DIR/auto-trait-leak.rs:12:1 | |
34 | | | |
94b46f34 XL |
35 | LL | fn cycle1() -> impl Clone { |
36 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
9fa01778 | 37 | = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... |
532ac7d7 | 38 | note: ...which requires processing `cycle2::{{opaque}}#0`... |
dfeec247 | 39 | --> $DIR/auto-trait-leak.rs:22:16 |
ff7c6d11 | 40 | | |
94b46f34 XL |
41 | LL | fn cycle2() -> impl Clone { |
42 | | ^^^^^^^^^^ | |
74b04a01 XL |
43 | note: ...which requires borrow-checking `cycle2`... |
44 | --> $DIR/auto-trait-leak.rs:22:1 | |
45 | | | |
46 | LL | fn cycle2() -> impl Clone { | |
47 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
48 | note: ...which requires processing `cycle2`... | |
49 | --> $DIR/auto-trait-leak.rs:22:1 | |
50 | | | |
51 | LL | fn cycle2() -> impl Clone { | |
52 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
94b46f34 | 53 | note: ...which requires processing `cycle2`... |
dfeec247 | 54 | --> $DIR/auto-trait-leak.rs:22:1 |
2c00a5a8 | 55 | | |
74b04a01 XL |
56 | LL | fn cycle2() -> impl Clone { |
57 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
58 | note: ...which requires unsafety-checking `cycle2`... | |
59 | --> $DIR/auto-trait-leak.rs:22:1 | |
60 | | | |
61 | LL | fn cycle2() -> impl Clone { | |
62 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
63 | note: ...which requires building MIR for... | |
64 | --> $DIR/auto-trait-leak.rs:22:1 | |
65 | | | |
66 | LL | fn cycle2() -> impl Clone { | |
67 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
68 | note: ...which requires type-checking `cycle2`... | |
69 | --> $DIR/auto-trait-leak.rs:22:1 | |
70 | | | |
94b46f34 XL |
71 | LL | fn cycle2() -> impl Clone { |
72 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
9fa01778 | 73 | = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... |
532ac7d7 | 74 | = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle |
0731742a | 75 | note: cycle used when checking item types in top-level module |
48663c56 | 76 | --> $DIR/auto-trait-leak.rs:1:1 |
0731742a XL |
77 | | |
78 | LL | / use std::cell::Cell; | |
79 | LL | | use std::rc::Rc; | |
80 | LL | | | |
81 | LL | | fn send<T: Send>(_: T) {} | |
82 | ... | | |
83 | LL | | Rc::new(String::from("foo")) | |
84 | LL | | } | |
85 | | |_^ | |
ff7c6d11 | 86 | |
532ac7d7 | 87 | error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0` |
48663c56 | 88 | --> $DIR/auto-trait-leak.rs:12:16 |
ff7c6d11 | 89 | | |
0531ce1d | 90 | LL | fn cycle1() -> impl Clone { |
94b46f34 | 91 | | ^^^^^^^^^^ |
83c7162d | 92 | | |
74b04a01 XL |
93 | note: ...which requires borrow-checking `cycle1`... |
94 | --> $DIR/auto-trait-leak.rs:12:1 | |
95 | | | |
96 | LL | fn cycle1() -> impl Clone { | |
97 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
94b46f34 | 98 | note: ...which requires processing `cycle1`... |
48663c56 | 99 | --> $DIR/auto-trait-leak.rs:12:1 |
94b46f34 | 100 | | |
74b04a01 XL |
101 | LL | fn cycle1() -> impl Clone { |
102 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
103 | note: ...which requires processing `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... | |
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 | | | |
94b46f34 XL |
121 | LL | fn cycle1() -> impl Clone { |
122 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
9fa01778 | 123 | = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... |
532ac7d7 | 124 | note: ...which requires processing `cycle2::{{opaque}}#0`... |
dfeec247 | 125 | --> $DIR/auto-trait-leak.rs:22:16 |
ff7c6d11 | 126 | | |
0531ce1d | 127 | LL | fn cycle2() -> impl Clone { |
ff7c6d11 | 128 | | ^^^^^^^^^^ |
74b04a01 XL |
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 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
83c7162d | 139 | note: ...which requires processing `cycle2`... |
dfeec247 XL |
140 | --> $DIR/auto-trait-leak.rs:22:1 |
141 | | | |
74b04a01 XL |
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... | |
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 | | | |
dfeec247 XL |
157 | LL | fn cycle2() -> impl Clone { |
158 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
159 | = note: ...which again requires processing `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 processing `cycle1::{{opaque}}#0` | |
173 | --> $DIR/auto-trait-leak.rs:12:16 | |
174 | | | |
175 | LL | fn cycle1() -> impl Clone { | |
176 | | ^^^^^^^^^^ | |
177 | | | |
74b04a01 XL |
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 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
dfeec247 XL |
188 | note: ...which requires processing `cycle1`... |
189 | --> $DIR/auto-trait-leak.rs:12:1 | |
190 | | | |
74b04a01 XL |
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... | |
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 | | | |
dfeec247 XL |
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 processing `cycle2::{{opaque}}#0`... | |
210 | --> $DIR/auto-trait-leak.rs:22:16 | |
211 | | | |
212 | LL | fn cycle2() -> impl Clone { | |
213 | | ^^^^^^^^^^ | |
74b04a01 XL |
214 | note: ...which requires borrow-checking `cycle2`... |
215 | --> $DIR/auto-trait-leak.rs:22:1 | |
216 | | | |
217 | LL | fn cycle2() -> impl Clone { | |
218 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
dfeec247 XL |
219 | note: ...which requires processing `cycle2`... |
220 | --> $DIR/auto-trait-leak.rs:22:1 | |
ff7c6d11 | 221 | | |
74b04a01 XL |
222 | LL | fn cycle2() -> impl Clone { |
223 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
224 | note: ...which requires processing `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... | |
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 | | | |
0531ce1d | 242 | LL | fn cycle2() -> impl Clone { |
ff7c6d11 | 243 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
532ac7d7 | 244 | = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle |
0731742a | 245 | note: cycle used when checking item types in top-level module |
48663c56 | 246 | --> $DIR/auto-trait-leak.rs:1:1 |
0731742a XL |
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 | | |_^ | |
94b46f34 | 256 | |
8faf50e0 | 257 | error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely |
dfeec247 | 258 | --> $DIR/auto-trait-leak.rs:16:5 |
ff7c6d11 | 259 | | |
e1599b0c | 260 | LL | fn send<T: Send>(_: T) {} |
ba9703b0 | 261 | | ---- required by this bound in `send` |
e1599b0c | 262 | ... |
94b46f34 XL |
263 | LL | send(cycle2().clone()); |
264 | | ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely | |
dfeec247 XL |
265 | ... |
266 | LL | fn cycle2() -> impl Clone { | |
267 | | ---------- within this `impl std::clone::Clone` | |
94b46f34 XL |
268 | | |
269 | = help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>` | |
270 | = note: required because it appears within the type `impl std::clone::Clone` | |
ff7c6d11 | 271 | |
dfeec247 | 272 | error: aborting due to 4 previous errors |
ff7c6d11 | 273 | |
48663c56 | 274 | Some errors have detailed explanations: E0277, E0391. |
0531ce1d | 275 | For more information about an error, try `rustc --explain E0277`. |