diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-07-24 15:08:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-24 15:08:21 +0200 |
| commit | 940376f1b1bbaa22a9eed14ee84a9f6390ffd53a (patch) | |
| tree | 1934710dc537527b010fe3ca35763685c041397e /compiler/rustc_lint/src | |
| parent | 319d54f3ecc3ab002119e6d8ebecf730de80f3ff (diff) | |
| parent | 41e6f767b64cebd08e1a25b18dfea7c13bf36a6a (diff) | |
| download | rust-940376f1b1bbaa22a9eed14ee84a9f6390ffd53a.tar.gz rust-940376f1b1bbaa22a9eed14ee84a9f6390ffd53a.zip | |
Rollup merge of #144014 - dianne:edition-guide-links, r=estebank
don't link to the nightly version of the Edition Guide in stable lints As reported in rust-lang/rust#143557 for `rust_2024_incompatible_pat`, most future-Edition-incompatibility lints link to the nightly version of the Edition Guide; the lints were written before their respective Editions (and their guides) stabilized. But now that Rusts 2021 and 2024 are stable, these lints are emitted on stable versions of the compiler, where it makes more sense to present users with links that don't say "nightly" in them. This does not change the link for `rust_2024_incompatible_pat`. That's handled in rust-lang/rust#144006.
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/if_let_rescope.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/impl_trait_overcaptures.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/macro_expr_fragment_specifier_2024_migration.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/shadowed_into_iter.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/static_mut_refs.rs | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 73e68834232..eb4c3703dbd 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1654,7 +1654,7 @@ declare_lint! { "`...` range patterns are deprecated", @future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021), - reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>", + reference: "<https://doc.rust-lang.org/edition-guide/rust-2021/warnings-promoted-to-error.html>", }; } @@ -1835,7 +1835,7 @@ declare_lint! { "detects edition keywords being used as an identifier", @future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024), - reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/gen-keyword.html>", + reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/gen-keyword.html>", }; } diff --git a/compiler/rustc_lint/src/if_let_rescope.rs b/compiler/rustc_lint/src/if_let_rescope.rs index 263ea6fa070..ff67ed1bc55 100644 --- a/compiler/rustc_lint/src/if_let_rescope.rs +++ b/compiler/rustc_lint/src/if_let_rescope.rs @@ -87,7 +87,7 @@ declare_lint! { rewriting in `match` is an option to preserve the semantics up to Edition 2021", @future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024), - reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>", + reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html>", }; } diff --git a/compiler/rustc_lint/src/impl_trait_overcaptures.rs b/compiler/rustc_lint/src/impl_trait_overcaptures.rs index c17281deff4..b9afb62cf1c 100644 --- a/compiler/rustc_lint/src/impl_trait_overcaptures.rs +++ b/compiler/rustc_lint/src/impl_trait_overcaptures.rs @@ -71,7 +71,7 @@ declare_lint! { "`impl Trait` will capture more lifetimes than possibly intended in edition 2024", @future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024), - reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>", + reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/rpit-lifetime-capture.html>", }; } diff --git a/compiler/rustc_lint/src/macro_expr_fragment_specifier_2024_migration.rs b/compiler/rustc_lint/src/macro_expr_fragment_specifier_2024_migration.rs index ce280fef8b6..7de6fbd941b 100644 --- a/compiler/rustc_lint/src/macro_expr_fragment_specifier_2024_migration.rs +++ b/compiler/rustc_lint/src/macro_expr_fragment_specifier_2024_migration.rs @@ -65,7 +65,7 @@ declare_lint! { /// to ensure the macros implement the desired behavior. /// /// [editions]: https://doc.rust-lang.org/edition-guide/ - /// [macro matcher fragment specifiers]: https://doc.rust-lang.org/nightly/edition-guide/rust-2024/macro-fragment-specifiers.html + /// [macro matcher fragment specifiers]: https://doc.rust-lang.org/edition-guide/rust-2024/macro-fragment-specifiers.html /// [`cargo fix`]: https://doc.rust-lang.org/cargo/commands/cargo-fix.html pub EDITION_2024_EXPR_FRAGMENT_SPECIFIER, Allow, @@ -73,7 +73,7 @@ declare_lint! { To keep the existing behavior, use the `expr_2021` fragment specifier.", @future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024), - reference: "Migration Guide <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/macro-fragment-specifiers.html>", + reference: "Migration Guide <https://doc.rust-lang.org/edition-guide/rust-2024/macro-fragment-specifiers.html>", }; } diff --git a/compiler/rustc_lint/src/shadowed_into_iter.rs b/compiler/rustc_lint/src/shadowed_into_iter.rs index 00fa0499556..d296ae46f43 100644 --- a/compiler/rustc_lint/src/shadowed_into_iter.rs +++ b/compiler/rustc_lint/src/shadowed_into_iter.rs @@ -32,7 +32,7 @@ declare_lint! { "detects calling `into_iter` on arrays in Rust 2015 and 2018", @future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2021), - reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>", + reference: "<https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html>", }; } @@ -61,7 +61,7 @@ declare_lint! { "detects calling `into_iter` on boxed slices in Rust 2015, 2018, and 2021", @future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024), - reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/intoiterator-box-slice.html>" + reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/intoiterator-box-slice.html>" }; } diff --git a/compiler/rustc_lint/src/static_mut_refs.rs b/compiler/rustc_lint/src/static_mut_refs.rs index 4dda3c7951b..16e1fb0192b 100644 --- a/compiler/rustc_lint/src/static_mut_refs.rs +++ b/compiler/rustc_lint/src/static_mut_refs.rs @@ -54,7 +54,7 @@ declare_lint! { "creating a shared reference to mutable static", @future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024), - reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>", + reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>", explain_reason: false, }; @edition Edition2024 => Deny; |
