Skip to content

Commit 29ed8fe

Browse files
tgross35traviscross
authored andcommitted
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 29ed8fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Missing macro fragment specifiers
22

3-
## Summary
3+
> **NOTE**: `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.
44
5-
- The [`missing_fragment_specifier`] lint is now a hard error.
5+
## Summary
66

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

99
## Details
1010

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.
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.
1212

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

3232
## Migration
3333

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.
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.
3535

3636
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)