Skip to content

Commit 4a463d9

Browse files
committed
Revert "Remove missing_fragment_specifier lint"
This reverts commit 5ba9610.
1 parent 877c7cb commit 4a463d9

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
@@ -1228,6 +1228,22 @@ declare_lint! {
12281228
};
12291229
}
12301230

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