2017-11-26 14:32:30 -06:00
|
|
|
error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`
|
|
|
|
--> $DIR/auto-trait-leak.rs:27:5
|
|
|
|
|
|
|
|
|
27 | send(before());
|
|
|
|
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
|
|
|
|
|
|
|
|
|
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
|
|
|
|
= 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>>]`
|
|
|
|
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
|
|
|
|
= note: required by `send`
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/auto-trait-leak.rs:30:5
|
2017-11-26 14:32:30 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
30 | send(after());
|
2017-11-26 14:32:30 -06:00
|
|
|
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
|
|
|
|
|
|
|
|
|
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
|
2017-12-10 14:29:24 -06:00
|
|
|
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak.rs:38:5: 38:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
|
2017-11-26 14:32:30 -06:00
|
|
|
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
|
|
|
|
= note: required by `send`
|
|
|
|
|
|
|
|
error[E0391]: unsupported cyclic reference between types/traits detected
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/auto-trait-leak.rs:44:1
|
2017-11-26 14:32:30 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
44 | fn cycle1() -> impl Clone {
|
2017-11-26 14:37:13 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference
|
2017-11-26 14:32:30 -06:00
|
|
|
|
|
|
|
|
note: the cycle begins when processing `cycle1`...
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/auto-trait-leak.rs:44:1
|
2017-11-26 14:32:30 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
44 | fn cycle1() -> impl Clone {
|
2017-11-26 14:35:19 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-11-26 14:32:30 -06:00
|
|
|
note: ...which then requires processing `cycle2::{{impl-Trait}}`...
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/auto-trait-leak.rs:52:16
|
2017-11-26 14:32:30 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
52 | fn cycle2() -> impl Clone {
|
2017-11-26 14:32:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
note: ...which then requires processing `cycle2`...
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/auto-trait-leak.rs:52:1
|
2017-11-26 14:32:30 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
52 | fn cycle2() -> impl Clone {
|
2017-11-26 14:35:19 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-11-26 14:32:30 -06:00
|
|
|
note: ...which then requires processing `cycle1::{{impl-Trait}}`...
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/auto-trait-leak.rs:44:16
|
2017-11-26 14:32:30 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
44 | fn cycle1() -> impl Clone {
|
2017-11-26 14:32:30 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
= note: ...which then again requires processing `cycle1`, completing the cycle.
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|