#![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.
This code emits no warnings because
impl Clone for Foois 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 forderived implementations, which also inhibit this lint.The inherent implementations behave as expected.