Skip to content

Commit eeb9d93

Browse files
committed
Update references to the missing_fragment_specifier lint
This lint is planned to be removed in [1], but CI is failing due to linkcheck issues in the edition guide. Remove links and add a note that the lint has become an error in all editions. [1]: rust-lang/rust#128425
1 parent 1b1bb49 commit eeb9d93

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/rust-2024/missing-macro-fragment-specifiers.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Missing macro fragment specifiers
22

3-
## Summary
3+
> [!NOTE]
4+
> `missing_fragment_specifier` was originally made a hard error only for the 2024 Edition. In the time since this edition was released, the lint has been made into a hard error for all editions.
45
5-
- The [`missing_fragment_specifier`] lint is now a hard error.
6+
## Summary
67

7-
[`missing_fragment_specifier`]: ../../rustc/lints/listing/deny-by-default.html#missing-fragment-specifier
8+
- The `missing_fragment_specifier` lint is now a hard error.
89

910
## Details
1011

11-
The [`missing_fragment_specifier`] lint detects a situation when an **unused** pattern in a `macro_rules!` macro definition has a meta-variable (e.g. `$e`) that is not followed by a fragment specifier (e.g. `:expr`). This is now a hard error in the 2024 Edition.
12+
The `missing_fragment_specifier` lint detects a situation when an **unused** pattern in a `macro_rules!` macro definition has a meta-variable (e.g. `$e`) that is not followed by a fragment specifier (e.g. `:expr`). This is now a hard error in the 2024 Edition.
1213

1314
```rust,compile_fail
1415
macro_rules! foo {
@@ -31,6 +32,6 @@ We'd like to make this a hard error in all editions, but there would be too much
3132

3233
## Migration
3334

34-
To migrate your code to the 2024 Edition, remove the unused matcher rule from the macro. The [`missing_fragment_specifier`] lint is on by default in all editions, and should alert you to macros with this issue.
35+
To migrate your code to the 2024 Edition, remove the unused matcher rule from the macro. The `missing_fragment_specifier` lint is on by default in all editions, and should alert you to macros with this issue.
3536

3637
There is no automatic migration for this change. We expect that this style of macro is extremely rare. The lint has been a future-incompatibility lint since Rust 1.17, a deny-by-default lint since Rust 1.20, and since Rust 1.82, it has warned about dependencies that are using this pattern.

0 commit comments

Comments
 (0)