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

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jan 30, 2023

Closes #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 dtolnay merged commit ea573a3 into master Jan 30, 2023
@dtolnay dtolnay deleted the asyncyieldsasync branch January 30, 2023 21:04
crapStone added a commit to Calciumdibromid/CaBr2 that referenced this pull request Feb 1, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [async-trait](https://github.com/dtolnay/async-trait) | dependencies | patch | `0.1.62` -> `0.1.64` |

---

### Release Notes

<details>
<summary>dtolnay/async-trait</summary>

### [`v0.1.64`](https://github.com/dtolnay/async-trait/releases/tag/0.1.64)

[Compare Source](dtolnay/async-trait@0.1.63...0.1.64)

-   Suppress async_yields_async clippy correctness lint in generated code ([#&#8203;236](dtolnay/async-trait#236), [#&#8203;237](dtolnay/async-trait#237))

### [`v0.1.63`](https://github.com/dtolnay/async-trait/releases/tag/0.1.63)

[Compare Source](dtolnay/async-trait@0.1.62...0.1.63)

-   Do not require Sync on unused shared reference arguments ([#&#8203;232](dtolnay/async-trait#232), [#&#8203;233](dtolnay/async-trait#233))
-   Make expansion of nested `_` and `..` patterns edition independent ([#&#8203;234](dtolnay/async-trait#234), [#&#8203;235](dtolnay/async-trait#235))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMTQuMSIsInVwZGF0ZWRJblZlciI6IjM0LjExNi4xIn0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Co-authored-by: crapStone <crapstone01@gmail.com>
Co-authored-by: crapStone <crapstone@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1750
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clippy lint async_returns_async fails if you return an awaitable type
1 participant