File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
compiler/rustc_lint_defs/src
src/doc/rustc/src/lints/listing Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff 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+
12301246declare_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 ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments