File tree 1 file changed +2
-2
lines changed
src/tools/clippy/tests/ui
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,11 @@ note: captured value is not `Send`
55
55
LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
56
56
| ^^ has type `std::rc::Rc<[u8]>` which is not `Send`
57
57
= note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
58
- note: captured value is not `Send`
58
+ note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
59
59
--> $DIR/future_not_send.rs:20:40
60
60
|
61
61
LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
62
- | ^^^^ has type `&std::cell::Cell<usize>` which is not `Send`
62
+ | ^^^^ has type `&std::cell::Cell<usize>` which is not `Send`, because `std::cell::Cell<usize>` is not `Sync`
63
63
= note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`
64
64
65
65
error: future cannot be sent between threads safely
You can’t perform that action at this time.
0 commit comments