`module_name_repetitions` no longer lints grouped re-exports
Author: kpreidCreated Sep 26, 2026Updated Oct 1, 2026
LabelsC-buggood first issueI-false-negative
Summary
module_name_repetitions no longer lints when the name that is repetitive is in a re-export group.
Lint Name
module_name_repetitions
Reproducer
I tried this code:
#![warn(clippy::module_name_repetitions)]
pub mod space {
mod happening {
pub struct SpaceTime {}
pub struct SpaceWedgie {}
pub struct NegativeSpaceWedgie {}
}
pub use happening::SpaceTime;
pub use happening::{NegativeSpaceWedgie, SpaceWedgie};
}I expected to see this happen: Lint on SpaceTime and SpaceWedgie re-exports, as on stable 1.98.1:
warning: item name starts with its containing module's name
--> src/lib.rs:10:24
|
10 | pub use happening::SpaceTime;
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#module_name_repetitions
note: the lint level is defined here
--> src/lib.rs:1:9
|
1 | #![warn(clippy::module_name_repetitions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: item name starts with its containing module's name
--> src/lib.rs:11:46
|
11 | pub use happening::{NegativeSpaceWedgie, SpaceWedgie};
| ^^^^^^^^^^^Instead, only one lint appeared, from the ungrouped import:
warning: item name starts with its containing module's name
--> src/lib.rs:10:24
|
10 | pub use happening::SpaceTime;
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/main/index.html#module_name_repetitionsI believe this change happened within the past day or two, but I have not bisected to be sure.
Version
rustc 1.100.0-nightly (5ceaf6608 2026-09-25)
binary: rustc
commit-hash: 5ceaf6608eb354c2f5bbb3b8d974caa367dac81c
commit-date: 2026-09-25
host: aarch64-apple-darwin
release: 1.100.0-nightly
LLVM version: 23.1.1Source: rust-lang/rust-clippy