Skip to content

clippy: remove lints removed in newer clippy versions - #4167

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
tangaac:fix/remove-removed-clippy-lints
Aug 26, 2026
Merged

clippy: remove lints removed in newer clippy versions#4167
seanmonstar merged 1 commit into
hyperium:masterfrom
tangaac:fix/remove-removed-clippy-lints

Conversation

@tangaac

@tangaac tangaac commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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 produce unknown lint errors that break CI on
stable and newer toolchains.

Removed lints:

  • clippy::unnecessary_rest_pattern
  • clippy::rest_pattern_accessible_field
  • clippy::definition_in_module_root

These were all set to "allow" with TODO comments indicating they were
already under consideration.

Verification

cargo clippy --features full --lib no longer emits unknown lint
warnings after this change.

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
seanmonstar merged commit 37c9d0c into hyperium:master Aug 26, 2026
23 checks passed
@dswij

dswij commented Aug 26, 2026

Copy link
Copy Markdown
Member

@seanmonstar

Copy link
Copy Markdown
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.)

@dswij

dswij commented Aug 26, 2026

Copy link
Copy Markdown
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

@seanmonstar

Copy link
Copy Markdown
Member

OK, I see. So then these are perhaps new lints to add with the MSRV bump I guess. 😵

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.

3 participants