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

Consider #[must_use] annotation on async fn as also affecting the Future::Output #100633

Merged
merged 4 commits into from
Nov 11, 2022

Commits on Nov 11, 2022

  1. Tweak span for #[must_use]

    Do not point at whole statement, only at the expression (skip pointing at `;`)
    estebank committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    50bb7a4 View commit details
    Browse the repository at this point in the history
  2. Consider #[must_use] annotation on async fn as also affecting the…

    … `Future::Output`
    
    No longer lint against `#[must_use] async fn foo()`.
    
    When encountering a statement that awaits on a `Future`, check if the
    `Future`'s parent item is annotated with `#[must_use]` and emit a lint
    if so. This effectively makes `must_use` an annotation on the
    `Future::Output` instead of only the `Future` itself.
    
    Fix rust-lang#78149.
    estebank committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    243496e View commit details
    Browse the repository at this point in the history
  3. review comments

    estebank committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    8bd8484 View commit details
    Browse the repository at this point in the history
  4. Fix tests after rebase

    estebank committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    f57713b View commit details
    Browse the repository at this point in the history