}
}
+ impl Clone for Bad {
+ fn clone(&self) -> Self {
+ Self
+ }
+ }
+
#[derive(Default)]
struct Good;
Self::default()
}
}
-
- // Check that self arg isn't linted
- impl Clone for Good {
- fn clone(&self) -> Self {
- // Note: Not linted and it wouldn't be valid
- // because "can't use `Self` as a constructor`"
- Good
- }
- }
}
mod issue2894 {
enum Enum {
A,
B(u64),
- C { field: bool }
+ C { field: bool },
}
impl Enum {
fn method() {