Skip to content

Commit 9414f0b

Browse files
committed
Revert "Remove missing_fragment_specifier lint"
This reverts commit 5ba9610.
1 parent 75e1acb commit 9414f0b

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,22 @@ declare_lint! {
12271227
};
12281228
}
12291229

1230+
declare_lint! {
1231+
/// The missing_fragment_specifier warning is issued when an unused pattern in a
1232+
/// `macro_rules!` macro definition has a meta-variable (e.g. `$e`) that is not
1233+
/// followed by a fragment specifier (e.g. `:expr`).
1234+
///
1235+
/// This warning can always be fixed by removing the unused pattern in the
1236+
/// `macro_rules!` macro definition.
1237+
pub MISSING_FRAGMENT_SPECIFIER,
1238+
Deny,
1239+
"detects missing fragment specifiers in unused `macro_rules!` patterns",
1240+
@future_incompatible = FutureIncompatibleInfo {
1241+
reference: "issue #40107 <https://github.com/rust-lang/rust/issues/40107>",
1242+
edition: None,
1243+
};
1244+
}
1245+
12301246
declare_lint! {
12311247
/// The `late_bound_lifetime_arguments` lint detects generic lifetime
12321248
/// arguments in path segments with late bound lifetime parameters.
@@ -2827,6 +2843,7 @@ declare_lint_pass! {
28272843
CONST_ITEM_MUTATION,
28282844
SAFE_PACKED_BORROWS,
28292845
PATTERNS_IN_FNS_WITHOUT_BODY,
2846+
MISSING_FRAGMENT_SPECIFIER,
28302847
LATE_BOUND_LIFETIME_ARGUMENTS,
28312848
ORDER_DEPENDENT_TRAIT_OBJECTS,
28322849
COHERENCE_LEAK_CHECK,

src/doc/rustc/src/lints/listing/deny-by-default.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)