]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / async-await / issues / issue-65436-raw-ptr-not-send.stderr
index 7638ba1fe7de886ae90c89799e0c8bdf404b2e16..49cd30e11a0c17b8fd329662aa3c494d0afa202f 100644 (file)
@@ -2,10 +2,10 @@ error: future cannot be sent between threads safely
   --> $DIR/issue-65436-raw-ptr-not-send.rs:12:5
    |
 LL | fn assert_send<T: Send>(_: T) {}
-   |    -----------    ---- required by this bound in `assert_send`
+   |                   ---- required by this bound in `assert_send`
 ...
 LL |     assert_send(async {
-   |     ^^^^^^^^^^^ future returned by `main` is not `Send`
+   |     ^^^^^^^^^^^ future created by async block is not `Send`
    |
    = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `*const u8`
 note: future is not `Send` as this value is used across an await
@@ -14,7 +14,7 @@ note: future is not `Send` as this value is used across an await
 LL |         bar(Foo(std::ptr::null())).await;
    |         ^^^^^^^^----------------^^^^^^^^- `std::ptr::null()` is later dropped here
    |         |       |
-   |         |       has type `*const u8`
+   |         |       has type `*const u8` which is not `Send`
    |         await occurs here, with `std::ptr::null()` maybe used later
 help: consider moving this into a `let` binding to create a shorter lived borrow
   --> $DIR/issue-65436-raw-ptr-not-send.rs:14:13