Skip to content

Commit 3b8d386

Browse files
authored
Rollup merge of rust-lang#87885 - m-ou-se:edition-guide-links, r=rylev
Link to edition guide instead of issues for 2021 lints. This changes the 2021 lints to not link to github issues, but to the edition guide instead. Fixes rust-lang#86996
2 parents 6bd5910 + 260f9b9 commit 3b8d386

32 files changed

+83
-83
lines changed

compiler/rustc_lint/src/array_into_iter.rs

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

compiler/rustc_lint/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ declare_lint! {
16801680
Warn,
16811681
"`...` range patterns are deprecated",
16821682
@future_incompatible = FutureIncompatibleInfo {
1683-
reference: "issue #80165 <https://github.com/rust-lang/rust/issues/80165>",
1683+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
16841684
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
16851685
};
16861686
}

compiler/rustc_lint_defs/src/builtin.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ declare_lint! {
16051605
Warn,
16061606
"suggest using `dyn Trait` for trait objects",
16071607
@future_incompatible = FutureIncompatibleInfo {
1608-
reference: "issue #80165 <https://github.com/rust-lang/rust/issues/80165>",
1608+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
16091609
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
16101610
};
16111611
}
@@ -3247,7 +3247,7 @@ declare_lint! {
32473247
Allow,
32483248
"detects usage of old versions of or-patterns",
32493249
@future_incompatible = FutureIncompatibleInfo {
3250-
reference: "issue #84869 <https://github.com/rust-lang/rust/issues/84869>",
3250+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>",
32513251
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
32523252
};
32533253
}
@@ -3296,7 +3296,7 @@ declare_lint! {
32963296
"detects the usage of trait methods which are ambiguous with traits added to the \
32973297
prelude in future editions",
32983298
@future_incompatible = FutureIncompatibleInfo {
3299-
reference: "issue #85684 <https://github.com/rust-lang/rust/issues/85684>",
3299+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>",
33003300
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
33013301
};
33023302
}
@@ -3331,7 +3331,7 @@ declare_lint! {
33313331
Allow,
33323332
"identifiers that will be parsed as a prefix in Rust 2021",
33333333
@future_incompatible = FutureIncompatibleInfo {
3334-
reference: "issue #84978 <https://github.com/rust-lang/rust/issues/84978>",
3334+
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>",
33353335
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
33363336
};
33373337
crate_level_only

src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ LL | foo::<BAR + BAR>();
139139
|
140140
= note: `#[warn(bare_trait_objects)]` on by default
141141
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
142-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
142+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
143143

144144
error[E0747]: type provided when a constant was expected
145145
--> $DIR/const-expression-suggest-missing-braces.rs:11:11

src/test/ui/dyn-keyword/dyn-2018-edition-lint.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ note: the lint level is defined here
1010
LL | #[deny(bare_trait_objects)]
1111
| ^^^^^^^^^^^^^^^^^^
1212
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
13-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
13+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
1414

1515
error: trait objects without an explicit `dyn` are deprecated
1616
--> $DIR/dyn-2018-edition-lint.rs:4:35
@@ -19,7 +19,7 @@ LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
1919
| ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait`
2020
|
2121
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
22-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
22+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
2323

2424
error: trait objects without an explicit `dyn` are deprecated
2525
--> $DIR/dyn-2018-edition-lint.rs:9:14
@@ -28,7 +28,7 @@ LL | let _x: &SomeTrait = todo!();
2828
| ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait`
2929
|
3030
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
31-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
31+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
3232

3333
error: aborting due to 3 previous errors
3434

src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
1818
|
1919
= note: `#[warn(bare_trait_objects)]` on by default
2020
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
21-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
21+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
2222

2323
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
2424
--> $DIR/gat-trait-path-parenthesised-args.rs:7:27

src/test/ui/issues/issue-86756.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LL | eq::<dyn, Foo>
2222
|
2323
= note: `#[warn(bare_trait_objects)]` on by default
2424
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
25-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
25+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
2626

2727
error[E0107]: missing generics for trait `Foo`
2828
--> $DIR/issue-86756.rs:5:15

src/test/ui/iterators/into-iter-on-arrays-2018.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let _: Iter<'_, i32> = array.into_iter();
66
|
77
= note: `#[warn(array_into_iter)]` on by default
88
= warning: this changes meaning in Rust 2021
9-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
9+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
1010
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
1111
|
1212
LL | let _: Iter<'_, i32> = array.iter();
@@ -23,7 +23,7 @@ LL | let _: Iter<'_, i32> = Box::new(array).into_iter();
2323
| ^^^^^^^^^
2424
|
2525
= warning: this changes meaning in Rust 2021
26-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
26+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2727
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
2828
|
2929
LL | let _: Iter<'_, i32> = Box::new(array).iter();
@@ -40,7 +40,7 @@ LL | for _ in [1, 2, 3].into_iter() {}
4040
| ^^^^^^^^^
4141
|
4242
= warning: this changes meaning in Rust 2021
43-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
43+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
4444
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
4545
|
4646
LL | for _ in [1, 2, 3].iter() {}

src/test/ui/iterators/into-iter-on-arrays-lint.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | small.into_iter();
66
|
77
= note: `#[warn(array_into_iter)]` on by default
88
= warning: this changes meaning in Rust 2021
9-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
9+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
1010
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
1111
|
1212
LL | small.iter();
@@ -23,7 +23,7 @@ LL | [1, 2].into_iter();
2323
| ^^^^^^^^^
2424
|
2525
= warning: this changes meaning in Rust 2021
26-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
26+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
2727
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
2828
|
2929
LL | [1, 2].iter();
@@ -40,7 +40,7 @@ LL | big.into_iter();
4040
| ^^^^^^^^^
4141
|
4242
= warning: this changes meaning in Rust 2021
43-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
43+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
4444
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
4545
|
4646
LL | big.iter();
@@ -57,7 +57,7 @@ LL | [0u8; 33].into_iter();
5757
| ^^^^^^^^^
5858
|
5959
= warning: this changes meaning in Rust 2021
60-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
60+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
6161
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
6262
|
6363
LL | [0u8; 33].iter();
@@ -74,7 +74,7 @@ LL | Box::new(small).into_iter();
7474
| ^^^^^^^^^
7575
|
7676
= warning: this changes meaning in Rust 2021
77-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
77+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
7878
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
7979
|
8080
LL | Box::new(small).iter();
@@ -91,7 +91,7 @@ LL | Box::new([1, 2]).into_iter();
9191
| ^^^^^^^^^
9292
|
9393
= warning: this changes meaning in Rust 2021
94-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
94+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
9595
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
9696
|
9797
LL | Box::new([1, 2]).iter();
@@ -108,7 +108,7 @@ LL | Box::new(big).into_iter();
108108
| ^^^^^^^^^
109109
|
110110
= warning: this changes meaning in Rust 2021
111-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
111+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
112112
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
113113
|
114114
LL | Box::new(big).iter();
@@ -125,7 +125,7 @@ LL | Box::new([0u8; 33]).into_iter();
125125
| ^^^^^^^^^
126126
|
127127
= warning: this changes meaning in Rust 2021
128-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
128+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
129129
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
130130
|
131131
LL | Box::new([0u8; 33]).iter();
@@ -142,7 +142,7 @@ LL | Box::new(Box::new(small)).into_iter();
142142
| ^^^^^^^^^
143143
|
144144
= warning: this changes meaning in Rust 2021
145-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
145+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
146146
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
147147
|
148148
LL | Box::new(Box::new(small)).iter();
@@ -159,7 +159,7 @@ LL | Box::new(Box::new([1, 2])).into_iter();
159159
| ^^^^^^^^^
160160
|
161161
= warning: this changes meaning in Rust 2021
162-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
162+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
163163
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
164164
|
165165
LL | Box::new(Box::new([1, 2])).iter();
@@ -176,7 +176,7 @@ LL | Box::new(Box::new(big)).into_iter();
176176
| ^^^^^^^^^
177177
|
178178
= warning: this changes meaning in Rust 2021
179-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
179+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
180180
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
181181
|
182182
LL | Box::new(Box::new(big)).iter();
@@ -193,7 +193,7 @@ LL | Box::new(Box::new([0u8; 33])).into_iter();
193193
| ^^^^^^^^^
194194
|
195195
= warning: this changes meaning in Rust 2021
196-
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
196+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
197197
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
198198
|
199199
LL | Box::new(Box::new([0u8; 33])).iter();

src/test/ui/lint/bare-trait-objects-path.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | Dyn::func();
1212
|
1313
= note: `#[warn(bare_trait_objects)]` on by default
1414
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
15-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
15+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
1616

1717
warning: trait objects without an explicit `dyn` are deprecated
1818
--> $DIR/bare-trait-objects-path.rs:17:5
@@ -21,7 +21,7 @@ LL | ::Dyn::func();
2121
| ^^^^^ help: use `dyn`: `<dyn (::Dyn)>`
2222
|
2323
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
24-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
24+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
2525

2626
warning: trait objects without an explicit `dyn` are deprecated
2727
--> $DIR/bare-trait-objects-path.rs:20:5
@@ -30,7 +30,7 @@ LL | Dyn::CONST;
3030
| ^^^ help: use `dyn`: `<dyn Dyn>`
3131
|
3232
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
33-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
33+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
3434

3535
error: aborting due to previous error; 3 warnings emitted
3636

src/test/ui/lint/force-warn/force-lint-in-allowed-group.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
66
|
77
= note: requested on the command line with `--force-warn bare-trait-objects`
88
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
9-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
9+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
1010

1111
warning: 1 warning emitted
1212

src/test/ui/lint/force-warn/force-warn-cap-lints-allow.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
66
|
77
= note: requested on the command line with `--force-warn bare-trait-objects`
88
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
9-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
9+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
1010

1111
warning: 1 warning emitted
1212

src/test/ui/lint/force-warn/force-warn-cap-lints-warn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | 0...100 => true,
66
|
77
= note: `--force-warn ellipsis-inclusive-range-patterns` implied by `--force-warn rust-2021-compatibility`
88
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
9-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
9+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
1010

1111
warning: 1 warning emitted
1212

src/test/ui/lint/force-warn/force-warn-group-allow-warning.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
66
|
77
= note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms`
88
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
9-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
9+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
1010

1111
warning: 1 warning emitted
1212

src/test/ui/lint/force-warn/force-warn-group.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
66
|
77
= note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms`
88
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
9-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
9+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
1010

1111
warning: 1 warning emitted
1212

src/test/ui/lint/inclusive-range-pattern-syntax.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ note: the lint level is defined here
1010
LL | #![warn(ellipsis_inclusive_range_patterns)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
13-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
13+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
1414

1515
warning: `...` range patterns are deprecated
1616
--> $DIR/inclusive-range-pattern-syntax.rs:16:9
@@ -19,7 +19,7 @@ LL | &1...2 => {}
1919
| ^^^^^^ help: use `..=` for an inclusive range: `&(1..=2)`
2020
|
2121
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
22-
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
22+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
2323

2424
warning: 2 warnings emitted
2525

0 commit comments

Comments
 (0)