This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ impl LateLintPass<'_> for EnumVariantNames {
277277 Some ( c) if is_word_beginning ( c) => span_lint (
278278 cx,
279279 MODULE_NAME_REPETITIONS ,
280- item. span ,
280+ item. ident . span ,
281281 "item name starts with its containing module's name" ,
282282 ) ,
283283 _ => ( ) ,
@@ -287,7 +287,7 @@ impl LateLintPass<'_> for EnumVariantNames {
287287 span_lint (
288288 cx,
289289 MODULE_NAME_REPETITIONS ,
290- item. span ,
290+ item. ident . span ,
291291 "item name ends with its containing module's name" ,
292292 ) ;
293293 }
Original file line number Diff line number Diff line change 11error: item name starts with its containing module's name
2- --> $DIR/module_name_repetitions.rs:8:5
2+ --> $DIR/module_name_repetitions.rs:8:12
33 |
44LL | pub fn foo_bar() {}
5- | ^^^^^^^^^^^^ ^^^^^^^
5+ | ^^^^^^^
66 |
77 = note: `-D clippy::module-name-repetitions` implied by `-D warnings`
88
99error: item name ends with its containing module's name
10- --> $DIR/module_name_repetitions.rs:9:5
10+ --> $DIR/module_name_repetitions.rs:9:12
1111 |
1212LL | pub fn bar_foo() {}
13- | ^^^^^^^^^^^^ ^^^^^^^
13+ | ^^^^^^^
1414
1515error: item name starts with its containing module's name
16- --> $DIR/module_name_repetitions.rs:10:5
16+ --> $DIR/module_name_repetitions.rs:10:16
1717 |
1818LL | pub struct FooCake;
19- | ^^^^^^^^^^^^ ^^^^^^^
19+ | ^^^^^^^
2020
2121error: item name ends with its containing module's name
22- --> $DIR/module_name_repetitions.rs:11:5
22+ --> $DIR/module_name_repetitions.rs:11:14
2323 |
2424LL | pub enum CakeFoo {}
25- | ^^^^^^^^^^^^ ^^^^^^^
25+ | ^^^^^^^
2626
2727error: item name starts with its containing module's name
28- --> $DIR/module_name_repetitions.rs:12:5
28+ --> $DIR/module_name_repetitions.rs:12:16
2929 |
3030LL | pub struct Foo7Bar;
31- | ^^^^^^^^^^^^ ^^^^^^^
31+ | ^^^^^^^
3232
3333error: aborting due to 5 previous errors
3434
You can’t perform that action at this time.
0 commit comments