@@ -41,12 +41,14 @@ declare_lint! {
41
41
///
42
42
/// ### Explanation
43
43
///
44
- /// Rust [editions] allow the language to evolve without breaking
45
- /// backwards compatibility. This lint catches code that uses new keywords
46
- /// that are added to the language that are used as identifiers (such as a
47
- /// variable name, function name, etc.). If you switch the compiler to a
48
- /// new edition without updating the code, then it will fail to compile if
49
- /// you are using a new keyword as an identifier.
44
+ /// Rust [editions] allow the language to evolve without breaking backwards compatibility.
45
+ /// This lint catches code that uses [macro matcher fragment specifiers] that have changes
46
+ /// the syntax in the edition 2024. If you switch the compiler to a
47
+ /// new edition without updating the code, your macros may behave differently.
48
+ ///
49
+ /// In the edition 2024, the `expr` fragment specifier `expr`
50
+ /// will also match `const { ... }` blocks. To keep the old behavior, you should use the
51
+ /// `expr_2021`.
50
52
///
51
53
/// This lint solves the problem automatically. It is "allow" by default
52
54
/// because the code is perfectly valid in older editions. The [`cargo
@@ -56,6 +58,7 @@ declare_lint! {
56
58
/// a new edition.
57
59
///
58
60
/// [editions]: https://doc.rust-lang.org/edition-guide/
61
+ /// [macro matcher fragment specifiers]: https://doc.rust-lang.org/nightly/edition-guide/rust-2024/macro-fragment-specifiers.html
59
62
/// [`cargo fix`]: https://doc.rust-lang.org/cargo/commands/cargo-fix.html
60
63
pub EDITION_2024_EXPR_FRAGMENT_SPECIFIER ,
61
64
Allow ,
0 commit comments