]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #64895 - davidtwco:issue-64130-async-error-definition, r=nikomatsakis
authorMazdak Farrokhzad <twingoow@gmail.com>
Tue, 1 Oct 2019 07:55:31 +0000 (09:55 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Oct 2019 07:55:31 +0000 (09:55 +0200)
async/await: improve not-send errors

cc #64130.

```
note: future does not implement `std::marker::Send` because this value is used across an await
  --> $DIR/issue-64130-non-send-future-diags.rs:15:5
   |
LL |     let g = x.lock().unwrap();
   |         - has type `std::sync::MutexGuard<'_, u32>`
LL |     baz().await;
   |     ^^^^^^^^^^^ await occurs here, with `g` maybe used later
LL | }
   | - `g` is later dropped here
```

r? @nikomatsakis

1  2 
src/librustc/ty/context.rs
src/librustc/ty/mod.rs

Simple merge
Simple merge