-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
dead_code: Inherent associated types are unconditionally considered dead #110332
Copy link
Copy link
Open
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.F-inherent_associated_types`#![feature(inherent_associated_types)]``#![feature(inherent_associated_types)]`L-dead_codeLint: dead_codeLint: dead_codeL-false-positiveLint: False positive (should not have fired).Lint: False positive (should not have fired).S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
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.F-inherent_associated_types`#![feature(inherent_associated_types)]``#![feature(inherent_associated_types)]`L-dead_codeLint: dead_codeLint: dead_codeL-false-positiveLint: False positive (should not have fired).Lint: False positive (should not have fired).S-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
In Progress
On nightly, the following code triggers
dead_codeeven though it should not.Actually until recently,
dead_codewas never triggered at all for inherent associated types.PR #110277 was just merged which started visiting more associated items exposing this bug.
The
dead_codepass never considers IATs as live symbols (live_symbols) even in cases where they should be.This feels like a regression but technically speaking it is not:
We switched from one extreme to the other. Thus not marking as such.
@rustbot label A-lint F-inherent_associated_types requires-nightly