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

Suppress async_yields_async clippy correctness lint in generated code #237

Merged
merged 2 commits into from
Jan 30, 2023

Commits on Jan 30, 2023

  1. Add regression test for issue 236

    Currently fails:
    
        error: an async construct yields a type which is itself awaitable
            --> tests/test.rs:1582:35
             |
        1582 |           async fn f() -> Ready<()> {
             |  ___________________________________^
        1583 | |             future::ready(())
        1584 | |         }
             | |         ^
             | |         |
             | |_________outer async construct
             |           awaitable value not awaited
             |
             = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#async_yields_async
        note: the lint level is defined here
            --> tests/test.rs:1562:13
             |
        1562 |     #![deny(clippy::async_yields_async)]
             |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
        help: consider awaiting this value
             |
        1582 ~         async fn f() -> Ready<()> {
        1583 +             future::ready(())
        1584 +         }.await
             |
    dtolnay committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    e6e736f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    54cc1ce View commit details
    Browse the repository at this point in the history