Repository navigation
chore(clippy): allow double_must_use on async_trait traits (clippy 1.99) - #43
Merged
Merged
Conversation
Rust 1.99's clippy fires double_must_use on the three #[async_trait] traits: the macro emits a bare #[must_use] on methods that return a Pin<Box<dyn Future>>, which is already must_use. The code is unchanged; scope an allow (with reason) to each trait. CI floats to stable via rust-toolchain.toml, so main and every PR went red the day 1.99 shipped.
|
ePHPm Preview — removed Preview deployment has been torn down. |
|
ePHPm Preview — deployed (health check pending)
Preview updates automatically on each push to this PR. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rust 1.99's clippy fires
double_must_useon the three#[async_trait]traits inlitewire-backend(ConnectionAuthenticator,BackendConn,Backend). The lint is triggered by the macro's expansion —async_traitputs a bare#[must_use]on methods returningPin<Box<dyn Future>>, which is already#[must_use]— not by anything in our source.Fix: a scoped
#[allow(clippy::double_must_use, reason = ...)]on each trait. No code change.Why now:
rust-toolchain.tomlpinschannel = "stable", so CI picked up 1.99 the day it shipped andmain+ every open PR (incl. #41) went red on clippy.Verified:
cargo +1.99 clippy --workspace --all-targets --keep-going -- -D warningsis clean.double_must_useis a long-standing lint, so the MSRV 1.88 job won't flag it as unknown.