2 #![warn(clippy::multiple_inherent_impl)]
24 impl super::MyStruct {
30 impl fmt::Debug for MyStruct {
31 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
32 write!(f, "MyStruct {{ }}")
37 struct WithArgs<T>(T);
48 // Ok, the struct is allowed to have multiple impls.
49 #[allow(clippy::multiple_inherent_impl)]
56 #[allow(clippy::multiple_inherent_impl)]
58 // Ok, the first block is skipped by this lint.
61 struct OneAllowedImpl;
62 impl OneAllowedImpl {}
63 #[allow(clippy::multiple_inherent_impl)]
64 impl OneAllowedImpl {}
65 impl OneAllowedImpl {} // Lint, only one of the three blocks is allowed.