fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.5 KiB29 linesraw
1error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
2  --> $DIR/auto-trait-leak2.rs:13:5
3   |
4LL | fn send<T: Send>(_: T) {}
5   |    ----    ---- required by this bound in `send`
6...
7LL |     send(before());
8   |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
9   |
10   = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
11   = 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>>]`
12   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
13
14error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
15  --> $DIR/auto-trait-leak2.rs:16:5
16   |
17LL | fn send<T: Send>(_: T) {}
18   |    ----    ---- required by this bound in `send`
19...
20LL |     send(after());
21   |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
22   |
23   = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
24   = 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>>]`
25   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
26
27error: aborting due to 2 previous errors
28
29For more information about this error, try `rustc --explain E0277`.