}
}
-//todo the lint does not handle lifetimed struct
-//the following module should trigger the lint on the third method only
mod lifetimes {
struct Foo<'a> {
foo_str: &'a str,
Foo { foo_str: "foo" }
}
- // `Self` is applicable here
+ // FIXME: the lint does not handle lifetimed struct
+ // `Self` should be applicable here
fn clone(&self) -> Foo<'a> {
Foo { foo_str: self.foo_str }
}
}
}
+mod tuple_structs {
+ pub struct TS(i32);
+
+ impl TS {
+ pub fn ts() -> Self {
+ TS(0)
+ }
+ }
+}
+
mod issue3410 {
struct A;