]> git.lizzy.rs Git - rust.git/commitdiff
update clippy ui test 'future_not_send.stderr' to match
authorchaz-kiker <chaz-kiker@lambdastudents.com>
Fri, 23 Jul 2021 17:30:52 +0000 (12:30 -0500)
committerchaz-kiker <chaz-kiker@lambdastudents.com>
Fri, 23 Jul 2021 17:55:13 +0000 (12:55 -0500)
the new diagnostic messages

src/tools/clippy/tests/ui/future_not_send.stderr

index b59dbb3e76c6455ac99d678f4bba6cca14bd7fd6..c734051ccf320b086567185414793a707c50a379 100644 (file)
@@ -55,11 +55,11 @@ note: captured value is not `Send`
 LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
    |                          ^^ has type `std::rc::Rc<[u8]>` which is not `Send`
    = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
-note: captured value is not `Send`
+note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
   --> $DIR/future_not_send.rs:20:40
    |
 LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
-   |                                        ^^^^ has type `&std::cell::Cell<usize>` which is not `Send`
+   |                                        ^^^^ has type `&std::cell::Cell<usize>` which is not `Send`, because `std::cell::Cell<usize>` is not `Sync`
    = note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`
 
 error: future cannot be sent between threads safely