| ItemKind::Static(..)
| ItemKind::Enum(..)
| ItemKind::Struct(..)
- | ItemKind::Union(..) => {
+ | ItemKind::Union(..)
+ | ItemKind::Impl(..) => {
// Don't check statements that shadow `Self` or where `Self` can't be used
},
_ => walk_item(self, item),
LL | use_self_expand!(); // Should lint in local macros
| ------------------- in this macro invocation
-error: aborting due to 24 previous errors
+error: unnecessary structure name repetition
+ --> $DIR/use_self.rs:255:29
+ |
+LL | fn bar() -> Bar {
+ | ^^^ help: use the applicable keyword: `Self`
+
+error: unnecessary structure name repetition
+ --> $DIR/use_self.rs:256:21
+ |
+LL | Bar {
+ | ^^^ help: use the applicable keyword: `Self`
+
+error: aborting due to 26 previous errors