]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/auto-trait-leak2.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / impl-trait / auto-trait-leak2.stderr
1 error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
2   --> $DIR/auto-trait-leak2.rs:25:5
3    |
4 LL |     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-leak2.rs:19:5: 19: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-leak2.rs:22:1
12    |
13 LL | fn send<T: Send>(_: T) {}
14    | ^^^^^^^^^^^^^^^^^^^^^^
15
16 error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
17   --> $DIR/auto-trait-leak2.rs:28:5
18    |
19 LL |     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-leak2.rs:36:5: 36: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-leak2.rs:22:1
27    |
28 LL | fn send<T: Send>(_: T) {}
29    | ^^^^^^^^^^^^^^^^^^^^^^
30
31 error: aborting due to 2 previous errors
32
33 For more information about this error, try `rustc --explain E0277`.