fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0` 2 --> $DIR/auto-trait-leak.rs:12:16 3 | 4LL | fn cycle1() -> impl Clone { 5 | ^^^^^^^^^^ 6 | 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 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 17note: ...which requires processing `cycle1`... 18 --> $DIR/auto-trait-leak.rs:12:1 19 | 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 | 35LL | fn cycle1() -> impl Clone { 36 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 37 = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... 38note: ...which requires processing `cycle2::{{opaque}}#0`... 39 --> $DIR/auto-trait-leak.rs:22:16 40 | 41LL | fn cycle2() -> impl Clone { 42 | ^^^^^^^^^^ 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 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 53note: ...which requires processing `cycle2`... 54 --> $DIR/auto-trait-leak.rs:22:1 55 | 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 | 71LL | fn cycle2() -> impl Clone { 72 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 73 = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... 74 = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle 75note: cycle used when checking item types in top-level module 76 --> $DIR/auto-trait-leak.rs:1:1 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 | |_^ 86 87error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0` 88 --> $DIR/auto-trait-leak.rs:12:16 89 | 90LL | fn cycle1() -> impl Clone { 91 | ^^^^^^^^^^ 92 | 93note: ...which requires borrow-checking `cycle1`... 94 --> $DIR/auto-trait-leak.rs:12:1 95 | 96LL | fn cycle1() -> impl Clone { 97 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 98note: ...which requires processing `cycle1`... 99 --> $DIR/auto-trait-leak.rs:12:1 100 | 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 | 121LL | fn cycle1() -> impl Clone { 122 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 123 = note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... 124note: ...which requires processing `cycle2::{{opaque}}#0`... 125 --> $DIR/auto-trait-leak.rs:22:16 126 | 127LL | fn cycle2() -> impl Clone { 128 | ^^^^^^^^^^ 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 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 139note: ...which requires processing `cycle2`... 140 --> $DIR/auto-trait-leak.rs:22:1 141 | 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 | 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 | 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 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 188note: ...which requires processing `cycle1`... 189 --> $DIR/auto-trait-leak.rs:12:1 190 | 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 | 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 | ^^^^^^^^^^ 214note: ...which requires borrow-checking `cycle2`... 215 --> $DIR/auto-trait-leak.rs:22:1 216 | 217LL | fn cycle2() -> impl Clone { 218 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 219note: ...which requires processing `cycle2`... 220 --> $DIR/auto-trait-leak.rs:22:1 221 | 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 | 242LL | fn cycle2() -> impl Clone { 243 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 244 = note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle 245note: cycle used when checking item types in top-level module 246 --> $DIR/auto-trait-leak.rs:1:1 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 | |_^ 256 257error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely 258 --> $DIR/auto-trait-leak.rs:16:5 259 | 260LL | fn send<T: Send>(_: T) {} 261 | ---- ---- required by this bound in `send` 262... 263LL | send(cycle2().clone()); 264 | ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely 265... 266LL | fn cycle2() -> impl Clone { 267 | ---------- within this `impl std::clone::Clone` 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` 271 272error: aborting due to 4 previous errors 273 274Some errors have detailed explanations: E0277, E0391. 275For more information about an error, try `rustc --explain E0277`.