]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/auto-trait-leak2.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / impl-trait / auto-trait-leak2.stderr
CommitLineData
8faf50e0 1error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
48663c56 2 --> $DIR/auto-trait-leak2.rs:13:5
94b46f34 3 |
dfeec247
XL
4LL | fn before() -> impl Fn(i32) {
5 | ------------ within this `impl std::ops::Fn<(i32,)>`
6...
e1599b0c 7LL | fn send<T: Send>(_: T) {}
ba9703b0 8 | ---- required by this bound in `send`
e1599b0c 9...
94b46f34
XL
10LL | send(before());
11 | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
12 |
13 = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
48663c56 14 = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
94b46f34 15 = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
94b46f34 16
8faf50e0 17error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
48663c56 18 --> $DIR/auto-trait-leak2.rs:16:5
94b46f34 19 |
e1599b0c 20LL | fn send<T: Send>(_: T) {}
ba9703b0 21 | ---- required by this bound in `send`
e1599b0c 22...
94b46f34
XL
23LL | send(after());
24 | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
dfeec247
XL
25...
26LL | fn after() -> impl Fn(i32) {
27 | ------------ within this `impl std::ops::Fn<(i32,)>`
94b46f34
XL
28 |
29 = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
48663c56 30 = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
94b46f34 31 = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
94b46f34
XL
32
33error: aborting due to 2 previous errors
34
35For more information about this error, try `rustc --explain E0277`.