clippy: remove lints removed in newer clippy versions - #4167
Merged
seanmonstar merged 1 commit intoAug 26, 2026
Conversation
The following lints no longer exist in recent clippy versions and cause `unknown lint` errors (promoted to errors by `-D warnings` / `-W unknown-lints`): - clippy::unnecessary_rest_pattern - clippy::rest_pattern_accessible_field - clippy::definition_in_module_root Remove them from the allowed lints list in Cargo.toml.
seanmonstar
approved these changes
Aug 26, 2026
Member
|
These lints are not removed, though. It hasn't landed on stable yet. See |
Member
|
Yea, I thought they were newly added when I fixed up CI a couple days ago. And CI seemed fine that I had added the rule... But CI was green on this PR too. (I got very little sleep last night, so might be why I'm more confused.) |
Member
|
Seems like the CI job did emit the warnings in master, but it came from rustc instead of clippy, so it's not denied 😅 https://github.com/hyperium/hyper/actions/runs/32725621086/job/97426119277 |
Member
|
OK, I see. So then these are perhaps new lints to add with the MSRV bump I guess. 😵 |
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.
Summary
Recent clippy versions have removed several lints that were previously
allowed in
Cargo.toml. With-D warnings(or the default-W unknown-lints), these produceunknown linterrors that break CI onstable and newer toolchains.
Removed lints:
clippy::unnecessary_rest_patternclippy::rest_pattern_accessible_fieldclippy::definition_in_module_rootThese were all set to
"allow"with TODO comments indicating they werealready under consideration.
Verification
cargo clippy --features full --libno longer emitsunknown lintwarnings after this change.