-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Re-enable detection of unused library #![feature] directives #44232
Copy link
Copy link
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Currently the compiler will warn users about unused
#![feature]directives if they're (a) a library feature and (b) not actually ever used. The compiler doesn't currently warn you about unused#![feature]directives tied to language features.In the process of making the stability annotations more incremental-friendly (#44137) this check in the compiler has proven to be very difficult to make incremental. Namely what's happening here is:
check_stability, which is used to verify that an API can actually be used.#![feature]directives.This "put things in a table on the side" behavior isn't very incremental friently and isn't too easy to transition over to the query system. For now this specific warning seems like it probably isn't that important at Rust 1.20.0 (while it was probably very important at Rust 1.0.0). I'm going to comment this out for now so we're not going to get lints/warnings about unused library features.
This is a FIXME to track re-enabling this warning!