-
Notifications
You must be signed in to change notification settings - Fork 14k
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.A-trait-systemArea: Trait systemArea: Trait systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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.
Description
#![crate_type="lib"]
enum Foo {
}
impl Clone for Foo {
fn clone(&self) -> Foo { loop {} }
}This code emits no warnings because impl Clone for Foo is considered a "use" of the enum, however, implementation for this enum cannot possibly be used either, as the enum is private and is unused. This is more notable for derived implementations, which also inhibit this lint.
The inherent implementations behave as expected.
zackmdavis, shepmaster, taiki-e, tjkirch, connec and 10 more
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.A-trait-systemArea: Trait systemArea: Trait systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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.