Skip to content

Commit e14fba7

Browse files
authored
Rollup merge of rust-lang#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#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#144006.
2 parents 45108e1 + 41e6f76 commit e14fba7

File tree

126 files changed

+465
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+465
-465
lines changed

compiler/rustc_hir_typeck/src/upvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10471047
}
10481048
}
10491049
}
1050-
lint.note("for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>");
1050+
lint.note("for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>");
10511051

10521052
let diagnostic_msg = format!(
10531053
"add a dummy let to cause {migrated_variables_concat} to be fully captured"

compiler/rustc_lint/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ lint_non_camel_case_type = {$sort} `{$name}` should have an upper camel case nam
593593
594594
lint_non_fmt_panic = panic message is not a string literal
595595
.note = this usage of `{$name}!()` is deprecated; it will be a hard error in Rust 2021
596-
.more_info_note = for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
596+
.more_info_note = for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/panic-macro-consistency.html>
597597
.supports_fmt_note = the `{$name}!()` macro supports formatting, so there's no need for the `format!()` macro here
598598
.supports_fmt_suggestion = remove the `format!(..)` macro call
599599
.display_suggestion = add a "{"{"}{"}"}" format string to `Display` the message

compiler/rustc_lint/src/builtin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ declare_lint! {
16541654
"`...` range patterns are deprecated",
16551655
@future_incompatible = FutureIncompatibleInfo {
16561656
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
1657-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
1657+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2021/warnings-promoted-to-error.html>",
16581658
};
16591659
}
16601660

@@ -1835,7 +1835,7 @@ declare_lint! {
18351835
"detects edition keywords being used as an identifier",
18361836
@future_incompatible = FutureIncompatibleInfo {
18371837
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
1838-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/gen-keyword.html>",
1838+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/gen-keyword.html>",
18391839
};
18401840
}
18411841

compiler/rustc_lint/src/if_let_rescope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ declare_lint! {
8787
rewriting in `match` is an option to preserve the semantics up to Edition 2021",
8888
@future_incompatible = FutureIncompatibleInfo {
8989
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
90-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>",
90+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html>",
9191
};
9292
}
9393

compiler/rustc_lint/src/impl_trait_overcaptures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ declare_lint! {
7171
"`impl Trait` will capture more lifetimes than possibly intended in edition 2024",
7272
@future_incompatible = FutureIncompatibleInfo {
7373
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
74-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>",
74+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/rpit-lifetime-capture.html>",
7575
};
7676
}
7777

compiler/rustc_lint/src/macro_expr_fragment_specifier_2024_migration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ declare_lint! {
6565
/// to ensure the macros implement the desired behavior.
6666
///
6767
/// [editions]: https://doc.rust-lang.org/edition-guide/
68-
/// [macro matcher fragment specifiers]: https://doc.rust-lang.org/nightly/edition-guide/rust-2024/macro-fragment-specifiers.html
68+
/// [macro matcher fragment specifiers]: https://doc.rust-lang.org/edition-guide/rust-2024/macro-fragment-specifiers.html
6969
/// [`cargo fix`]: https://doc.rust-lang.org/cargo/commands/cargo-fix.html
7070
pub EDITION_2024_EXPR_FRAGMENT_SPECIFIER,
7171
Allow,
7272
"The `expr` fragment specifier will accept more expressions in the 2024 edition. \
7373
To keep the existing behavior, use the `expr_2021` fragment specifier.",
7474
@future_incompatible = FutureIncompatibleInfo {
7575
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
76-
reference: "Migration Guide <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/macro-fragment-specifiers.html>",
76+
reference: "Migration Guide <https://doc.rust-lang.org/edition-guide/rust-2024/macro-fragment-specifiers.html>",
7777
};
7878
}
7979

compiler/rustc_lint/src/shadowed_into_iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ declare_lint! {
3232
"detects calling `into_iter` on arrays in Rust 2015 and 2018",
3333
@future_incompatible = FutureIncompatibleInfo {
3434
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2021),
35-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>",
35+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html>",
3636
};
3737
}
3838

@@ -61,7 +61,7 @@ declare_lint! {
6161
"detects calling `into_iter` on boxed slices in Rust 2015, 2018, and 2021",
6262
@future_incompatible = FutureIncompatibleInfo {
6363
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
64-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/intoiterator-box-slice.html>"
64+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/intoiterator-box-slice.html>"
6565
};
6666
}
6767

compiler/rustc_lint/src/static_mut_refs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ declare_lint! {
5454
"creating a shared reference to mutable static",
5555
@future_incompatible = FutureIncompatibleInfo {
5656
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
57-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>",
57+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>",
5858
explain_reason: false,
5959
};
6060
@edition Edition2024 => Deny;

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ declare_lint! {
18141814
"suggest using `dyn Trait` for trait objects",
18151815
@future_incompatible = FutureIncompatibleInfo {
18161816
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
1817-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
1817+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2021/warnings-promoted-to-error.html>",
18181818
};
18191819
}
18201820

@@ -2472,7 +2472,7 @@ declare_lint! {
24722472
"unsafe operations in unsafe functions without an explicit unsafe block are deprecated",
24732473
@future_incompatible = FutureIncompatibleInfo {
24742474
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
2475-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>",
2475+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>",
24762476
explain_reason: false
24772477
};
24782478
@edition Edition2024 => Warn;
@@ -3445,7 +3445,7 @@ declare_lint! {
34453445
"detects usage of old versions of or-patterns",
34463446
@future_incompatible = FutureIncompatibleInfo {
34473447
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
3448-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>",
3448+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2021/or-patterns-macro-rules.html>",
34493449
};
34503450
}
34513451

@@ -3494,7 +3494,7 @@ declare_lint! {
34943494
prelude in future editions",
34953495
@future_incompatible = FutureIncompatibleInfo {
34963496
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
3497-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>",
3497+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html>",
34983498
};
34993499
}
35003500

@@ -3534,7 +3534,7 @@ declare_lint! {
35343534
prelude in future editions",
35353535
@future_incompatible = FutureIncompatibleInfo {
35363536
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
3537-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/prelude.html>",
3537+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/prelude.html>",
35383538
};
35393539
}
35403540

@@ -3571,7 +3571,7 @@ declare_lint! {
35713571
"identifiers that will be parsed as a prefix in Rust 2021",
35723572
@future_incompatible = FutureIncompatibleInfo {
35733573
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
3574-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>",
3574+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2021/reserving-syntax.html>",
35753575
};
35763576
crate_level_only
35773577
}
@@ -4100,7 +4100,7 @@ declare_lint! {
41004100
"never type fallback affecting unsafe function calls",
41014101
@future_incompatible = FutureIncompatibleInfo {
41024102
reason: FutureIncompatibilityReason::EditionAndFutureReleaseSemanticsChange(Edition::Edition2024),
4103-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html>",
4103+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/never-type-fallback.html>",
41044104
report_in_deps: true,
41054105
};
41064106
@edition Edition2024 => Deny;
@@ -4155,7 +4155,7 @@ declare_lint! {
41554155
"never type fallback affecting unsafe function calls",
41564156
@future_incompatible = FutureIncompatibleInfo {
41574157
reason: FutureIncompatibilityReason::EditionAndFutureReleaseError(Edition::Edition2024),
4158-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html>",
4158+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/never-type-fallback.html>",
41594159
report_in_deps: true,
41604160
};
41614161
report_in_external_macro
@@ -4740,7 +4740,7 @@ declare_lint! {
47404740
"detects unsafe functions being used as safe functions",
47414741
@future_incompatible = FutureIncompatibleInfo {
47424742
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
4743-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/newly-unsafe-functions.html>",
4743+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/newly-unsafe-functions.html>",
47444744
};
47454745
}
47464746

@@ -4776,7 +4776,7 @@ declare_lint! {
47764776
"detects missing unsafe keyword on extern declarations",
47774777
@future_incompatible = FutureIncompatibleInfo {
47784778
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
4779-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-extern.html>",
4779+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-extern.html>",
47804780
};
47814781
}
47824782

@@ -4817,7 +4817,7 @@ declare_lint! {
48174817
"detects unsafe attributes outside of unsafe",
48184818
@future_incompatible = FutureIncompatibleInfo {
48194819
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
4820-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-attributes.html>",
4820+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-attributes.html>",
48214821
};
48224822
}
48234823

@@ -5014,7 +5014,7 @@ declare_lint! {
50145014
"Detect and warn on significant change in drop order in tail expression location",
50155015
@future_incompatible = FutureIncompatibleInfo {
50165016
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
5017-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>",
5017+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/temporary-tail-expr-scope.html>",
50185018
};
50195019
}
50205020

@@ -5053,7 +5053,7 @@ declare_lint! {
50535053
"will be parsed as a guarded string in Rust 2024",
50545054
@future_incompatible = FutureIncompatibleInfo {
50555055
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2024),
5056-
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/reserved-syntax.html>",
5056+
reference: "<https://doc.rust-lang.org/edition-guide/rust-2024/reserved-syntax.html>",
50575057
};
50585058
crate_level_only
50595059
}

src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ error: creating a shared reference to mutable static
328328
LL | if X.is_some() {
329329
| ^^^^^^^^^^^ shared reference to mutable static
330330
|
331-
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
331+
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
332332
= note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
333333
= note: `#[deny(static_mut_refs)]` on by default
334334

0 commit comments

Comments
 (0)