]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/auto-trait-leak.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / impl-trait / auto-trait-leak.stderr
CommitLineData
532ac7d7 1error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
48663c56 2 --> $DIR/auto-trait-leak.rs:12:16
ff7c6d11 3 |
94b46f34
XL
4LL | fn cycle1() -> impl Clone {
5 | ^^^^^^^^^^
ff7c6d11 6 |
74b04a01
XL
7note: ...which requires borrow-checking `cycle1`...
8 --> $DIR/auto-trait-leak.rs:12:1
9 |
10LL | fn cycle1() -> impl Clone {
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^
12note: ...which requires processing `cycle1`...
13 --> $DIR/auto-trait-leak.rs:12:1
14 |
15LL | fn cycle1() -> impl Clone {
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^
94b46f34 17note: ...which requires processing `cycle1`...
48663c56 18 --> $DIR/auto-trait-leak.rs:12:1
2c00a5a8 19 |
74b04a01
XL
20LL | fn cycle1() -> impl Clone {
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^
22note: ...which requires unsafety-checking `cycle1`...
23 --> $DIR/auto-trait-leak.rs:12:1
24 |
25LL | fn cycle1() -> impl Clone {
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^
27note: ...which requires building MIR for...
28 --> $DIR/auto-trait-leak.rs:12:1
29 |
30LL | fn cycle1() -> impl Clone {
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^
32note: ...which requires type-checking `cycle1`...
33 --> $DIR/auto-trait-leak.rs:12:1
34 |
94b46f34
XL
35LL | fn cycle1() -> impl Clone {
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^
9fa01778 37 = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
532ac7d7 38note: ...which requires processing `cycle2::{{opaque}}#0`...
dfeec247 39 --> $DIR/auto-trait-leak.rs:22:16
ff7c6d11 40 |
94b46f34
XL
41LL | fn cycle2() -> impl Clone {
42 | ^^^^^^^^^^
74b04a01
XL
43note: ...which requires borrow-checking `cycle2`...
44 --> $DIR/auto-trait-leak.rs:22:1
45 |
46LL | fn cycle2() -> impl Clone {
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^
48note: ...which requires processing `cycle2`...
49 --> $DIR/auto-trait-leak.rs:22:1
50 |
51LL | fn cycle2() -> impl Clone {
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^
94b46f34 53note: ...which requires processing `cycle2`...
dfeec247 54 --> $DIR/auto-trait-leak.rs:22:1
2c00a5a8 55 |
74b04a01
XL
56LL | fn cycle2() -> impl Clone {
57 | ^^^^^^^^^^^^^^^^^^^^^^^^^
58note: ...which requires unsafety-checking `cycle2`...
59 --> $DIR/auto-trait-leak.rs:22:1
60 |
61LL | fn cycle2() -> impl Clone {
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^
63note: ...which requires building MIR for...
64 --> $DIR/auto-trait-leak.rs:22:1
65 |
66LL | fn cycle2() -> impl Clone {
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^
68note: ...which requires type-checking `cycle2`...
69 --> $DIR/auto-trait-leak.rs:22:1
70 |
94b46f34
XL
71LL | 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 75note: cycle used when checking item types in top-level module
48663c56 76 --> $DIR/auto-trait-leak.rs:1:1
0731742a
XL
77 |
78LL | / use std::cell::Cell;
79LL | | use std::rc::Rc;
80LL | |
81LL | | fn send<T: Send>(_: T) {}
82... |
83LL | | Rc::new(String::from("foo"))
84LL | | }
85 | |_^
ff7c6d11 86
532ac7d7 87error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
48663c56 88 --> $DIR/auto-trait-leak.rs:12:16
ff7c6d11 89 |
0531ce1d 90LL | fn cycle1() -> impl Clone {
94b46f34 91 | ^^^^^^^^^^
83c7162d 92 |
74b04a01
XL
93note: ...which requires borrow-checking `cycle1`...
94 --> $DIR/auto-trait-leak.rs:12:1
95 |
96LL | fn cycle1() -> impl Clone {
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^
94b46f34 98note: ...which requires processing `cycle1`...
48663c56 99 --> $DIR/auto-trait-leak.rs:12:1
94b46f34 100 |
74b04a01
XL
101LL | fn cycle1() -> impl Clone {
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^
103note: ...which requires processing `cycle1`...
104 --> $DIR/auto-trait-leak.rs:12:1
105 |
106LL | fn cycle1() -> impl Clone {
107 | ^^^^^^^^^^^^^^^^^^^^^^^^^
108note: ...which requires unsafety-checking `cycle1`...
109 --> $DIR/auto-trait-leak.rs:12:1
110 |
111LL | fn cycle1() -> impl Clone {
112 | ^^^^^^^^^^^^^^^^^^^^^^^^^
113note: ...which requires building MIR for...
114 --> $DIR/auto-trait-leak.rs:12:1
115 |
116LL | fn cycle1() -> impl Clone {
117 | ^^^^^^^^^^^^^^^^^^^^^^^^^
118note: ...which requires type-checking `cycle1`...
119 --> $DIR/auto-trait-leak.rs:12:1
120 |
94b46f34
XL
121LL | fn cycle1() -> impl Clone {
122 | ^^^^^^^^^^^^^^^^^^^^^^^^^
9fa01778 123 = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
532ac7d7 124note: ...which requires processing `cycle2::{{opaque}}#0`...
dfeec247 125 --> $DIR/auto-trait-leak.rs:22:16
ff7c6d11 126 |
0531ce1d 127LL | fn cycle2() -> impl Clone {
ff7c6d11 128 | ^^^^^^^^^^
74b04a01
XL
129note: ...which requires borrow-checking `cycle2`...
130 --> $DIR/auto-trait-leak.rs:22:1
131 |
132LL | fn cycle2() -> impl Clone {
133 | ^^^^^^^^^^^^^^^^^^^^^^^^^
134note: ...which requires processing `cycle2`...
135 --> $DIR/auto-trait-leak.rs:22:1
136 |
137LL | fn cycle2() -> impl Clone {
138 | ^^^^^^^^^^^^^^^^^^^^^^^^^
83c7162d 139note: ...which requires processing `cycle2`...
dfeec247
XL
140 --> $DIR/auto-trait-leak.rs:22:1
141 |
74b04a01
XL
142LL | fn cycle2() -> impl Clone {
143 | ^^^^^^^^^^^^^^^^^^^^^^^^^
144note: ...which requires unsafety-checking `cycle2`...
145 --> $DIR/auto-trait-leak.rs:22:1
146 |
147LL | fn cycle2() -> impl Clone {
148 | ^^^^^^^^^^^^^^^^^^^^^^^^^
149note: ...which requires building MIR for...
150 --> $DIR/auto-trait-leak.rs:22:1
151 |
152LL | fn cycle2() -> impl Clone {
153 | ^^^^^^^^^^^^^^^^^^^^^^^^^
154note: ...which requires type-checking `cycle2`...
155 --> $DIR/auto-trait-leak.rs:22:1
156 |
dfeec247
XL
157LL | fn cycle2() -> impl Clone {
158 | ^^^^^^^^^^^^^^^^^^^^^^^^^
159 = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
160note: cycle used when checking item types in top-level module
161 --> $DIR/auto-trait-leak.rs:1:1
162 |
163LL | / use std::cell::Cell;
164LL | | use std::rc::Rc;
165LL | |
166LL | | fn send<T: Send>(_: T) {}
167... |
168LL | | Rc::new(String::from("foo"))
169LL | | }
170 | |_^
171
172error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
173 --> $DIR/auto-trait-leak.rs:12:16
174 |
175LL | fn cycle1() -> impl Clone {
176 | ^^^^^^^^^^
177 |
74b04a01
XL
178note: ...which requires borrow-checking `cycle1`...
179 --> $DIR/auto-trait-leak.rs:12:1
180 |
181LL | fn cycle1() -> impl Clone {
182 | ^^^^^^^^^^^^^^^^^^^^^^^^^
183note: ...which requires processing `cycle1`...
184 --> $DIR/auto-trait-leak.rs:12:1
185 |
186LL | fn cycle1() -> impl Clone {
187 | ^^^^^^^^^^^^^^^^^^^^^^^^^
dfeec247
XL
188note: ...which requires processing `cycle1`...
189 --> $DIR/auto-trait-leak.rs:12:1
190 |
74b04a01
XL
191LL | fn cycle1() -> impl Clone {
192 | ^^^^^^^^^^^^^^^^^^^^^^^^^
193note: ...which requires unsafety-checking `cycle1`...
194 --> $DIR/auto-trait-leak.rs:12:1
195 |
196LL | fn cycle1() -> impl Clone {
197 | ^^^^^^^^^^^^^^^^^^^^^^^^^
198note: ...which requires building MIR for...
199 --> $DIR/auto-trait-leak.rs:12:1
200 |
201LL | fn cycle1() -> impl Clone {
202 | ^^^^^^^^^^^^^^^^^^^^^^^^^
203note: ...which requires type-checking `cycle1`...
204 --> $DIR/auto-trait-leak.rs:12:1
205 |
dfeec247
XL
206LL | fn cycle1() -> impl Clone {
207 | ^^^^^^^^^^^^^^^^^^^^^^^^^
208 = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
209note: ...which requires processing `cycle2::{{opaque}}#0`...
210 --> $DIR/auto-trait-leak.rs:22:16
211 |
212LL | fn cycle2() -> impl Clone {
213 | ^^^^^^^^^^
74b04a01
XL
214note: ...which requires borrow-checking `cycle2`...
215 --> $DIR/auto-trait-leak.rs:22:1
216 |
217LL | fn cycle2() -> impl Clone {
218 | ^^^^^^^^^^^^^^^^^^^^^^^^^
dfeec247
XL
219note: ...which requires processing `cycle2`...
220 --> $DIR/auto-trait-leak.rs:22:1
ff7c6d11 221 |
74b04a01
XL
222LL | fn cycle2() -> impl Clone {
223 | ^^^^^^^^^^^^^^^^^^^^^^^^^
224note: ...which requires processing `cycle2`...
225 --> $DIR/auto-trait-leak.rs:22:1
226 |
227LL | fn cycle2() -> impl Clone {
228 | ^^^^^^^^^^^^^^^^^^^^^^^^^
229note: ...which requires unsafety-checking `cycle2`...
230 --> $DIR/auto-trait-leak.rs:22:1
231 |
232LL | fn cycle2() -> impl Clone {
233 | ^^^^^^^^^^^^^^^^^^^^^^^^^
234note: ...which requires building MIR for...
235 --> $DIR/auto-trait-leak.rs:22:1
236 |
237LL | fn cycle2() -> impl Clone {
238 | ^^^^^^^^^^^^^^^^^^^^^^^^^
239note: ...which requires type-checking `cycle2`...
240 --> $DIR/auto-trait-leak.rs:22:1
241 |
0531ce1d 242LL | fn cycle2() -> impl Clone {
ff7c6d11 243 | ^^^^^^^^^^^^^^^^^^^^^^^^^
532ac7d7 244 = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
0731742a 245note: cycle used when checking item types in top-level module
48663c56 246 --> $DIR/auto-trait-leak.rs:1:1
0731742a
XL
247 |
248LL | / use std::cell::Cell;
249LL | | use std::rc::Rc;
250LL | |
251LL | | fn send<T: Send>(_: T) {}
252... |
253LL | | Rc::new(String::from("foo"))
254LL | | }
255 | |_^
94b46f34 256
8faf50e0 257error[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 260LL | fn send<T: Send>(_: T) {}
ba9703b0 261 | ---- required by this bound in `send`
e1599b0c 262...
94b46f34
XL
263LL | send(cycle2().clone());
264 | ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely
dfeec247
XL
265...
266LL | 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 272error: aborting due to 4 previous errors
ff7c6d11 273
48663c56 274Some errors have detailed explanations: E0277, E0391.
0531ce1d 275For more information about an error, try `rustc --explain E0277`.