auto-trait-leak.stderr 2.5 KB
Newer Older
1 2 3 4 5 6 7 8 9
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,)>`
10 11 12 13 14
note: required by `send`
  --> $DIR/auto-trait-leak.rs:24:1
   |
24 | fn send<T: Send>(_: T) {}
   | ^^^^^^^^^^^^^^^^^^^^^^
15 16

error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`
17
  --> $DIR/auto-trait-leak.rs:30:5
18
   |
19
30 |     send(after());
20 21 22
   |     ^^^^ `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>>`
23
   = 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>>]`
24
   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
25 26 27 28 29
note: required by `send`
  --> $DIR/auto-trait-leak.rs:24:1
   |
24 | fn send<T: Send>(_: T) {}
   | ^^^^^^^^^^^^^^^^^^^^^^
30 31

error[E0391]: unsupported cyclic reference between types/traits detected
32
  --> $DIR/auto-trait-leak.rs:44:1
33
   |
34
44 | fn cycle1() -> impl Clone {
35
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference
36 37
   |
note: the cycle begins when processing `cycle1`...
38
  --> $DIR/auto-trait-leak.rs:44:1
39
   |
40
44 | fn cycle1() -> impl Clone {
41
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
42
note: ...which then requires processing `cycle2::{{impl-Trait}}`...
43
  --> $DIR/auto-trait-leak.rs:52:16
44
   |
45
52 | fn cycle2() -> impl Clone {
46 47
   |                ^^^^^^^^^^
note: ...which then requires processing `cycle2`...
48
  --> $DIR/auto-trait-leak.rs:52:1
49
   |
50
52 | fn cycle2() -> impl Clone {
51
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
52
note: ...which then requires processing `cycle1::{{impl-Trait}}`...
53
  --> $DIR/auto-trait-leak.rs:44:16
54
   |
55
44 | fn cycle1() -> impl Clone {
56 57 58 59 60
   |                ^^^^^^^^^^
   = note: ...which then again requires processing `cycle1`, completing the cycle.

error: aborting due to 3 previous errors