Skip to content

Commit 8b075fc

Browse files
committed
Move clippy::module_name_repetitions to restriction (from pedantic)
Rational: - Too pedantic IMO, it's often better to have fine grained modules and then rexport stuff instead of one gigantic file - STD doesn't do this either. Examples: - std::vec::Vec - std::collections::vec_deque::VecDequeue - rust-clippy#7666 commonly ignored
1 parent 48e98ec commit 8b075fc

File tree

4 files changed

+1
-4
lines changed

4 files changed

+1
-4
lines changed

clippy_lints/src/item_name_repetitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ declare_clippy_lint! {
7171
/// ```
7272
#[clippy::version = "1.33.0"]
7373
pub MODULE_NAME_REPETITIONS,
74-
pedantic,
74+
restriction,
7575
"type names prefixed/postfixed with their containing module's name"
7676
}
7777

clippy_lints/src/literal_representation.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ impl LiteralDigitGrouping {
412412
}
413413
}
414414

415-
#[expect(clippy::module_name_repetitions)]
416415
pub struct DecimalLiteralRepresentation {
417416
threshold: u64,
418417
}

clippy_lints/src/macro_use.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ impl MacroRefData {
4343
}
4444

4545
#[derive(Default)]
46-
#[expect(clippy::module_name_repetitions)]
4746
pub struct MacroUseImports {
4847
/// the actual import path used and the span of the attribute above it. The value is
4948
/// the location, where the lint should be emitted.

clippy_lints/src/vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use rustc_middle::ty::layout::LayoutOf;
1717
use rustc_session::impl_lint_pass;
1818
use rustc_span::{DesugaringKind, Span, sym};
1919

20-
#[expect(clippy::module_name_repetitions)]
2120
pub struct UselessVec {
2221
too_large_for_stack: u64,
2322
msrv: Msrv,

0 commit comments

Comments
 (0)