Skip to content

allow unused_features lint#114

Draft
BennoLossin wants to merge 1 commit intomainfrom
dev/allow-unused-features
Draft

allow unused_features lint#114
BennoLossin wants to merge 1 commit intomainfrom
dev/allow-unused-features

Conversation

@BennoLossin
Copy link
Member

The unused_features lint was introduced in rust-lang/rust#152164, presumably landing in Rust 1.96.0. We simplified the way we use features in #102, always enabling them when building the crate with certain features enabled. For this reason allow the lint.

I plan to also add a new CI run that enables the lint & checks if we can remove certain features. Will do so at a later point in time.

This PR fixes the CI failure observed in https://github.com/Rust-for-Linux/pin-init/actions/runs/22754182535

The `unused_features` lint was introduced in [1], presumably landing in
Rust 1.96.0. We simplified the way we use features in #102, always
enabling them when building the crate with certain features enabled. For
this reason allow the lint.

Link: rust-lang/rust#152164 [1]
Signed-off-by: Benno Lossin <lossin@kernel.org>
Copy link
Member

@nbdd0121 nbdd0121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would also need to enable this in general for other kernel crates, I think?

@BennoLossin
Copy link
Member Author

Yes, I already notified Miguel (although in the kernel it only is a warning as opposed to here where it is an error due to our deny(warnings)).

@nbdd0121
Copy link
Member

nbdd0121 commented Mar 6, 2026

There's CONFIG_WERROR so it's also problematic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants