File tree 2 files changed +12
-12
lines changed
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 {
277
277
Some ( c) if is_word_beginning ( c) => span_lint (
278
278
cx,
279
279
MODULE_NAME_REPETITIONS ,
280
- item. span ,
280
+ item. ident . span ,
281
281
"item name starts with its containing module's name" ,
282
282
) ,
283
283
_ => ( ) ,
@@ -287,7 +287,7 @@ impl LateLintPass<'_> for EnumVariantNames {
287
287
span_lint (
288
288
cx,
289
289
MODULE_NAME_REPETITIONS ,
290
- item. span ,
290
+ item. ident . span ,
291
291
"item name ends with its containing module's name" ,
292
292
) ;
293
293
}
Original file line number Diff line number Diff line change 1
1
error: 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
3
3
|
4
4
LL | pub fn foo_bar() {}
5
- | ^^^^^^^^^^^^ ^^^^^^^
5
+ | ^^^^^^^
6
6
|
7
7
= note: `-D clippy::module-name-repetitions` implied by `-D warnings`
8
8
9
9
error: 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
11
11
|
12
12
LL | pub fn bar_foo() {}
13
- | ^^^^^^^^^^^^ ^^^^^^^
13
+ | ^^^^^^^
14
14
15
15
error: 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
17
17
|
18
18
LL | pub struct FooCake;
19
- | ^^^^^^^^^^^^ ^^^^^^^
19
+ | ^^^^^^^
20
20
21
21
error: 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
23
23
|
24
24
LL | pub enum CakeFoo {}
25
- | ^^^^^^^^^^^^ ^^^^^^^
25
+ | ^^^^^^^
26
26
27
27
error: 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
29
29
|
30
30
LL | pub struct Foo7Bar;
31
- | ^^^^^^^^^^^^ ^^^^^^^
31
+ | ^^^^^^^
32
32
33
33
error: aborting due to 5 previous errors
34
34
You can’t perform that action at this time.
0 commit comments