|
| 1 | +error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>` |
| 2 | + --> $DIR/auto-trait-leak.rs:27:5 |
| 3 | + | |
| 4 | +27 | send(before()); |
| 5 | + | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely |
| 6 | + | |
| 7 | + = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>` |
| 8 | + = note: required because it appears within the type `[closure@$DIR/auto-trait-leak.rs:21:5: 21:22 p:std::rc::Rc<std::cell::Cell<i32>>]` |
| 9 | + = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` |
| 10 | + = note: required by `send` |
| 11 | + |
| 12 | +error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>` |
| 13 | + --> $DIR/auto-trait-leak.rs:34:5 |
| 14 | + | |
| 15 | +34 | send(after()); |
| 16 | + | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely |
| 17 | + | |
| 18 | + = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>` |
| 19 | + = note: required because it appears within the type `[closure@$DIR/auto-trait-leak.rs:46:5: 46:22 p:std::rc::Rc<std::cell::Cell<i32>>]` |
| 20 | + = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` |
| 21 | + = note: required by `send` |
| 22 | + |
| 23 | +error[E0391]: unsupported cyclic reference between types/traits detected |
| 24 | + --> $DIR/auto-trait-leak.rs:52:1 |
| 25 | + | |
| 26 | +52 | fn cycle1() -> impl Clone { |
| 27 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference |
| 28 | + | |
| 29 | +note: the cycle begins when processing `cycle1`... |
| 30 | + --> $DIR/auto-trait-leak.rs:52:1 |
| 31 | + | |
| 32 | +52 | fn cycle1() -> impl Clone { |
| 33 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 34 | +note: ...which then requires processing `cycle2::{{impl-Trait}}`... |
| 35 | + --> $DIR/auto-trait-leak.rs:63:16 |
| 36 | + | |
| 37 | +63 | fn cycle2() -> impl Clone { |
| 38 | + | ^^^^^^^^^^ |
| 39 | +note: ...which then requires processing `cycle2`... |
| 40 | + --> $DIR/auto-trait-leak.rs:63:1 |
| 41 | + | |
| 42 | +63 | fn cycle2() -> impl Clone { |
| 43 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | +note: ...which then requires processing `cycle1::{{impl-Trait}}`... |
| 45 | + --> $DIR/auto-trait-leak.rs:52:16 |
| 46 | + | |
| 47 | +52 | fn cycle1() -> impl Clone { |
| 48 | + | ^^^^^^^^^^ |
| 49 | + = note: ...which then again requires processing `cycle1`, completing the cycle. |
| 50 | + |
| 51 | +error: aborting due to 3 previous errors |
| 52 | + |
0 commit comments