]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/auto-trait-leak.stderr
Rollup merge of #95352 - jyn514:full-relative-path, r=Mark-Simulacrum
[rust.git] / src / test / ui / impl-trait / auto-trait-leak.stderr
1 error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`
2   --> $DIR/auto-trait-leak.rs:12:16
3    |
4 LL | fn cycle1() -> impl Clone {
5    |                ^^^^^^^^^^
6    |
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    | ^^^^^^^^^^^^^^^^^^^^^^^^^
17 note: ...which requires processing MIR for `cycle1`...
18   --> $DIR/auto-trait-leak.rs:12:1
19    |
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 `cycle1`...
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    |
35 LL | fn cycle1() -> impl Clone {
36    | ^^^^^^^^^^^^^^^^^^^^^^^^^
37 note: ...which requires computing type of `cycle2::{opaque#0}`...
38   --> $DIR/auto-trait-leak.rs:20:16
39    |
40 LL | fn cycle2() -> impl Clone {
41    |                ^^^^^^^^^^
42 note: ...which requires borrow-checking `cycle2`...
43   --> $DIR/auto-trait-leak.rs:20:1
44    |
45 LL | fn cycle2() -> impl Clone {
46    | ^^^^^^^^^^^^^^^^^^^^^^^^^
47 note: ...which requires processing `cycle2`...
48   --> $DIR/auto-trait-leak.rs:20:1
49    |
50 LL | fn cycle2() -> impl Clone {
51    | ^^^^^^^^^^^^^^^^^^^^^^^^^
52 note: ...which requires processing MIR for `cycle2`...
53   --> $DIR/auto-trait-leak.rs:20:1
54    |
55 LL | fn cycle2() -> impl Clone {
56    | ^^^^^^^^^^^^^^^^^^^^^^^^^
57 note: ...which requires unsafety-checking `cycle2`...
58   --> $DIR/auto-trait-leak.rs:20:1
59    |
60 LL | fn cycle2() -> impl Clone {
61    | ^^^^^^^^^^^^^^^^^^^^^^^^^
62 note: ...which requires building MIR for `cycle2`...
63   --> $DIR/auto-trait-leak.rs:20:1
64    |
65 LL | fn cycle2() -> impl Clone {
66    | ^^^^^^^^^^^^^^^^^^^^^^^^^
67 note: ...which requires type-checking `cycle2`...
68   --> $DIR/auto-trait-leak.rs:20:1
69    |
70 LL | fn cycle2() -> impl Clone {
71    | ^^^^^^^^^^^^^^^^^^^^^^^^^
72    = note: ...which again requires computing type of `cycle1::{opaque#0}`, completing the cycle
73 note: cycle used when checking item types in top-level module
74   --> $DIR/auto-trait-leak.rs:1:1
75    |
76 LL | / use std::cell::Cell;
77 LL | | use std::rc::Rc;
78 LL | |
79 LL | | fn send<T: Send>(_: T) {}
80 ...  |
81 LL | |     Rc::new(String::from("foo"))
82 LL | | }
83    | |_^
84
85 error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`
86   --> $DIR/auto-trait-leak.rs:12:16
87    |
88 LL | fn cycle1() -> impl Clone {
89    |                ^^^^^^^^^^
90    |
91 note: ...which requires borrow-checking `cycle1`...
92   --> $DIR/auto-trait-leak.rs:12:1
93    |
94 LL | fn cycle1() -> impl Clone {
95    | ^^^^^^^^^^^^^^^^^^^^^^^^^
96 note: ...which requires processing `cycle1`...
97   --> $DIR/auto-trait-leak.rs:12:1
98    |
99 LL | fn cycle1() -> impl Clone {
100    | ^^^^^^^^^^^^^^^^^^^^^^^^^
101 note: ...which requires processing MIR for `cycle1`...
102   --> $DIR/auto-trait-leak.rs:12:1
103    |
104 LL | fn cycle1() -> impl Clone {
105    | ^^^^^^^^^^^^^^^^^^^^^^^^^
106 note: ...which requires unsafety-checking `cycle1`...
107   --> $DIR/auto-trait-leak.rs:12:1
108    |
109 LL | fn cycle1() -> impl Clone {
110    | ^^^^^^^^^^^^^^^^^^^^^^^^^
111 note: ...which requires building MIR for `cycle1`...
112   --> $DIR/auto-trait-leak.rs:12:1
113    |
114 LL | fn cycle1() -> impl Clone {
115    | ^^^^^^^^^^^^^^^^^^^^^^^^^
116 note: ...which requires type-checking `cycle1`...
117   --> $DIR/auto-trait-leak.rs:12:1
118    |
119 LL | fn cycle1() -> impl Clone {
120    | ^^^^^^^^^^^^^^^^^^^^^^^^^
121 note: ...which requires computing type of `cycle2::{opaque#0}`...
122   --> $DIR/auto-trait-leak.rs:20:16
123    |
124 LL | fn cycle2() -> impl Clone {
125    |                ^^^^^^^^^^
126 note: ...which requires borrow-checking `cycle2`...
127   --> $DIR/auto-trait-leak.rs:20:1
128    |
129 LL | fn cycle2() -> impl Clone {
130    | ^^^^^^^^^^^^^^^^^^^^^^^^^
131 note: ...which requires processing `cycle2`...
132   --> $DIR/auto-trait-leak.rs:20:1
133    |
134 LL | fn cycle2() -> impl Clone {
135    | ^^^^^^^^^^^^^^^^^^^^^^^^^
136 note: ...which requires processing MIR for `cycle2`...
137   --> $DIR/auto-trait-leak.rs:20:1
138    |
139 LL | fn cycle2() -> impl Clone {
140    | ^^^^^^^^^^^^^^^^^^^^^^^^^
141 note: ...which requires unsafety-checking `cycle2`...
142   --> $DIR/auto-trait-leak.rs:20:1
143    |
144 LL | fn cycle2() -> impl Clone {
145    | ^^^^^^^^^^^^^^^^^^^^^^^^^
146 note: ...which requires building MIR for `cycle2`...
147   --> $DIR/auto-trait-leak.rs:20:1
148    |
149 LL | fn cycle2() -> impl Clone {
150    | ^^^^^^^^^^^^^^^^^^^^^^^^^
151 note: ...which requires type-checking `cycle2`...
152   --> $DIR/auto-trait-leak.rs:20:1
153    |
154 LL | fn cycle2() -> impl Clone {
155    | ^^^^^^^^^^^^^^^^^^^^^^^^^
156    = note: ...which again requires computing type of `cycle1::{opaque#0}`, completing the cycle
157 note: cycle used when checking item types in top-level module
158   --> $DIR/auto-trait-leak.rs:1:1
159    |
160 LL | / use std::cell::Cell;
161 LL | | use std::rc::Rc;
162 LL | |
163 LL | | fn send<T: Send>(_: T) {}
164 ...  |
165 LL | |     Rc::new(String::from("foo"))
166 LL | | }
167    | |_^
168
169 error: aborting due to 2 previous errors
170
171 For more information about this error, try `rustc --explain E0391`.