Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async/await: improve not-send errors #64895

Merged

Commits on Sep 30, 2019

  1. async/await: improve obligation errors

    This commit improves obligation errors for async/await:
    
    ```
    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
    ```
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Sep 30, 2019
    Configuration menu
    Copy the full SHA
    04fa9b1 View commit details
    Browse the repository at this point in the history