]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/auto-trait-leak.stderr
New upstream version 1.25.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / auto-trait-leak.stderr
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 --> $DIR/auto-trait-leak.rs:24:1
12 |
13 24 | fn send<T: Send>(_: T) {}
14 | ^^^^^^^^^^^^^^^^^^^^^^
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 | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
21 |
22 = 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 note: required by `send`
26 --> $DIR/auto-trait-leak.rs:24:1
27 |
28 24 | fn send<T: Send>(_: T) {}
29 | ^^^^^^^^^^^^^^^^^^^^^^
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 = note: ...which then again requires processing `cycle1`, completing the cycle.
58
59 error: aborting due to 3 previous errors
60