1 error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`
2 --> $DIR/auto-trait-leak.rs:12:16
4 LL | fn cycle1() -> impl Clone {
7 note: ...which requires borrow-checking `cycle1`...
8 --> $DIR/auto-trait-leak.rs:12:1
10 LL | fn cycle1() -> impl Clone {
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^
12 note: ...which requires processing `cycle1`...
13 --> $DIR/auto-trait-leak.rs:12:1
15 LL | fn cycle1() -> impl Clone {
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^
17 note: ...which requires processing MIR for `cycle1`...
18 --> $DIR/auto-trait-leak.rs:12:1
20 LL | fn cycle1() -> impl Clone {
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^
22 note: ...which requires unsafety-checking `cycle1`...
23 --> $DIR/auto-trait-leak.rs:12:1
25 LL | fn cycle1() -> impl Clone {
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^
27 note: ...which requires building MIR for `cycle1`...
28 --> $DIR/auto-trait-leak.rs:12:1
30 LL | fn cycle1() -> impl Clone {
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^
32 note: ...which requires type-checking `cycle1`...
33 --> $DIR/auto-trait-leak.rs:12:1
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
40 LL | fn cycle2() -> impl Clone {
42 note: ...which requires borrow-checking `cycle2`...
43 --> $DIR/auto-trait-leak.rs:20:1
45 LL | fn cycle2() -> impl Clone {
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^
47 note: ...which requires processing `cycle2`...
48 --> $DIR/auto-trait-leak.rs:20:1
50 LL | fn cycle2() -> impl Clone {
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^
52 note: ...which requires processing MIR for `cycle2`...
53 --> $DIR/auto-trait-leak.rs:20:1
55 LL | fn cycle2() -> impl Clone {
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^
57 note: ...which requires unsafety-checking `cycle2`...
58 --> $DIR/auto-trait-leak.rs:20:1
60 LL | fn cycle2() -> impl Clone {
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^
62 note: ...which requires building MIR for `cycle2`...
63 --> $DIR/auto-trait-leak.rs:20:1
65 LL | fn cycle2() -> impl Clone {
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^
67 note: ...which requires type-checking `cycle2`...
68 --> $DIR/auto-trait-leak.rs:20:1
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
76 LL | / use std::cell::Cell;
77 LL | | use std::rc::Rc;
79 LL | | fn send<T: Send>(_: T) {}
81 LL | | Rc::new(String::from("foo"))
85 error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`
86 --> $DIR/auto-trait-leak.rs:12:16
88 LL | fn cycle1() -> impl Clone {
91 note: ...which requires borrow-checking `cycle1`...
92 --> $DIR/auto-trait-leak.rs:12:1
94 LL | fn cycle1() -> impl Clone {
95 | ^^^^^^^^^^^^^^^^^^^^^^^^^
96 note: ...which requires processing `cycle1`...
97 --> $DIR/auto-trait-leak.rs:12:1
99 LL | fn cycle1() -> impl Clone {
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^
101 note: ...which requires processing MIR for `cycle1`...
102 --> $DIR/auto-trait-leak.rs:12:1
104 LL | fn cycle1() -> impl Clone {
105 | ^^^^^^^^^^^^^^^^^^^^^^^^^
106 note: ...which requires unsafety-checking `cycle1`...
107 --> $DIR/auto-trait-leak.rs:12:1
109 LL | fn cycle1() -> impl Clone {
110 | ^^^^^^^^^^^^^^^^^^^^^^^^^
111 note: ...which requires building MIR for `cycle1`...
112 --> $DIR/auto-trait-leak.rs:12:1
114 LL | fn cycle1() -> impl Clone {
115 | ^^^^^^^^^^^^^^^^^^^^^^^^^
116 note: ...which requires type-checking `cycle1`...
117 --> $DIR/auto-trait-leak.rs:12:1
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
124 LL | fn cycle2() -> impl Clone {
126 note: ...which requires borrow-checking `cycle2`...
127 --> $DIR/auto-trait-leak.rs:20:1
129 LL | fn cycle2() -> impl Clone {
130 | ^^^^^^^^^^^^^^^^^^^^^^^^^
131 note: ...which requires processing `cycle2`...
132 --> $DIR/auto-trait-leak.rs:20:1
134 LL | fn cycle2() -> impl Clone {
135 | ^^^^^^^^^^^^^^^^^^^^^^^^^
136 note: ...which requires processing MIR for `cycle2`...
137 --> $DIR/auto-trait-leak.rs:20:1
139 LL | fn cycle2() -> impl Clone {
140 | ^^^^^^^^^^^^^^^^^^^^^^^^^
141 note: ...which requires unsafety-checking `cycle2`...
142 --> $DIR/auto-trait-leak.rs:20:1
144 LL | fn cycle2() -> impl Clone {
145 | ^^^^^^^^^^^^^^^^^^^^^^^^^
146 note: ...which requires building MIR for `cycle2`...
147 --> $DIR/auto-trait-leak.rs:20:1
149 LL | fn cycle2() -> impl Clone {
150 | ^^^^^^^^^^^^^^^^^^^^^^^^^
151 note: ...which requires type-checking `cycle2`...
152 --> $DIR/auto-trait-leak.rs:20:1
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
160 LL | / use std::cell::Cell;
161 LL | | use std::rc::Rc;
163 LL | | fn send<T: Send>(_: T) {}
165 LL | | Rc::new(String::from("foo"))
169 error: aborting due to 2 previous errors
171 For more information about this error, try `rustc --explain E0391`.