about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-04-01 18:53:00 -0700
committerTyler Mandry <tmandry@gmail.com>2020-04-13 18:58:11 -0700
commitaed7c30e4f794bc285aeca36dd9e2cc02cef2754 (patch)
treec5158b1f439ee02f3b1fafffe8212af8ade85a34 /src/test
parent6edfd66c5db78a4672e054c7a9a8207da64e98f6 (diff)
downloadrust-aed7c30e4f794bc285aeca36dd9e2cc02cef2754.tar.gz
rust-aed7c30e4f794bc285aeca36dd9e2cc02cef2754.zip
Use clearer message when obligation is caused by await expr
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/async-await/issue-68112.stderr9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/test/ui/async-await/issue-68112.stderr b/src/test/ui/async-await/issue-68112.stderr
index eec2171024a..f79908110c4 100644
--- a/src/test/ui/async-await/issue-68112.stderr
+++ b/src/test/ui/async-await/issue-68112.stderr
@@ -8,16 +8,13 @@ LL |     require_send(send_fut);
    |     ^^^^^^^^^^^^ future created by async block is not `Send`
    |
    = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
-note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-68112.rs:32:9
+note: future is not `Send` as this value is used in an await
+  --> $DIR/issue-68112.rs:31:17
    |
 LL |         let non_send_fut = make_non_send_future1();
    |             ------------ created here
 LL |         let _ = non_send_fut.await;
-LL |         ready(0).await;
-   |         ^^^^^^^^ await occurs here, with `non_send_fut` maybe used later
-LL |     };
-   |     - `non_send_fut` is later dropped here
+   |                 ^^^^^^^^^^^^ await occurs here
 
 error[E0277]: `std::cell::RefCell<i32>` cannot be shared between threads safely
   --> $DIR/issue-68112.rs:49:5