Skip to content

Commit

Permalink
Link to edition guide instead of issues for 2021 lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Aug 9, 2021
1 parent eaf6f46 commit 260f9b9
Show file tree
Hide file tree
Showing 32 changed files with 83 additions and 83 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/array_into_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ declare_lint! {
Warn,
"detects calling `into_iter` on arrays in Rust 2015 and 2018",
@future_incompatible = FutureIncompatibleInfo {
reference: "issue #66145 <https://github.com/rust-lang/rust/issues/66145>",
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>",
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2021),
};
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ declare_lint! {
Warn,
"`...` range patterns are deprecated",
@future_incompatible = FutureIncompatibleInfo {
reference: "issue #80165 <https://github.com/rust-lang/rust/issues/80165>",
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
};
}
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ declare_lint! {
Warn,
"suggest using `dyn Trait` for trait objects",
@future_incompatible = FutureIncompatibleInfo {
reference: "issue #80165 <https://github.com/rust-lang/rust/issues/80165>",
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>",
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
};
}
Expand Down Expand Up @@ -3247,7 +3247,7 @@ declare_lint! {
Allow,
"detects usage of old versions of or-patterns",
@future_incompatible = FutureIncompatibleInfo {
reference: "issue #84869 <https://github.com/rust-lang/rust/issues/84869>",
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>",
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
};
}
Expand Down Expand Up @@ -3296,7 +3296,7 @@ declare_lint! {
"detects the usage of trait methods which are ambiguous with traits added to the \
prelude in future editions",
@future_incompatible = FutureIncompatibleInfo {
reference: "issue #85684 <https://github.com/rust-lang/rust/issues/85684>",
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>",
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
};
}
Expand Down Expand Up @@ -3331,7 +3331,7 @@ declare_lint! {
Allow,
"identifiers that will be parsed as a prefix in Rust 2021",
@future_incompatible = FutureIncompatibleInfo {
reference: "issue #84978 <https://github.com/rust-lang/rust/issues/84978>",
reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>",
reason: FutureIncompatibilityReason::EditionError(Edition::Edition2021),
};
crate_level_only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ LL | foo::<BAR + BAR>();
|
= note: `#[warn(bare_trait_objects)]` on by default
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

error[E0747]: type provided when a constant was expected
--> $DIR/const-expression-suggest-missing-braces.rs:11:11
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/dyn-keyword/dyn-2018-edition-lint.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: the lint level is defined here
LL | #[deny(bare_trait_objects)]
| ^^^^^^^^^^^^^^^^^^
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

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

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

error: aborting due to 3 previous errors

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

error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/gat-trait-path-parenthesised-args.rs:7:27
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-86756.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ LL | eq::<dyn, Foo>
|
= note: `#[warn(bare_trait_objects)]` on by default
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

error[E0107]: missing generics for trait `Foo`
--> $DIR/issue-86756.rs:5:15
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/iterators/into-iter-on-arrays-2018.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | let _: Iter<'_, i32> = array.into_iter();
|
= note: `#[warn(array_into_iter)]` on by default
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | let _: Iter<'_, i32> = array.iter();
Expand All @@ -23,7 +23,7 @@ LL | let _: Iter<'_, i32> = Box::new(array).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | let _: Iter<'_, i32> = Box::new(array).iter();
Expand All @@ -40,7 +40,7 @@ LL | for _ in [1, 2, 3].into_iter() {}
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | for _ in [1, 2, 3].iter() {}
Expand Down
24 changes: 12 additions & 12 deletions src/test/ui/iterators/into-iter-on-arrays-lint.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | small.into_iter();
|
= note: `#[warn(array_into_iter)]` on by default
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | small.iter();
Expand All @@ -23,7 +23,7 @@ LL | [1, 2].into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | [1, 2].iter();
Expand All @@ -40,7 +40,7 @@ LL | big.into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | big.iter();
Expand All @@ -57,7 +57,7 @@ LL | [0u8; 33].into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | [0u8; 33].iter();
Expand All @@ -74,7 +74,7 @@ LL | Box::new(small).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | Box::new(small).iter();
Expand All @@ -91,7 +91,7 @@ LL | Box::new([1, 2]).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | Box::new([1, 2]).iter();
Expand All @@ -108,7 +108,7 @@ LL | Box::new(big).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | Box::new(big).iter();
Expand All @@ -125,7 +125,7 @@ LL | Box::new([0u8; 33]).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | Box::new([0u8; 33]).iter();
Expand All @@ -142,7 +142,7 @@ LL | Box::new(Box::new(small)).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | Box::new(Box::new(small)).iter();
Expand All @@ -159,7 +159,7 @@ LL | Box::new(Box::new([1, 2])).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | Box::new(Box::new([1, 2])).iter();
Expand All @@ -176,7 +176,7 @@ LL | Box::new(Box::new(big)).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | Box::new(Box::new(big)).iter();
Expand All @@ -193,7 +193,7 @@ LL | Box::new(Box::new([0u8; 33])).into_iter();
| ^^^^^^^^^
|
= warning: this changes meaning in Rust 2021
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html>
help: use `.iter()` instead of `.into_iter()` to avoid ambiguity
|
LL | Box::new(Box::new([0u8; 33])).iter();
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/lint/bare-trait-objects-path.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LL | Dyn::func();
|
= note: `#[warn(bare_trait_objects)]` on by default
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

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

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

error: aborting due to previous error; 3 warnings emitted

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

warning: 1 warning emitted

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

warning: 1 warning emitted

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

warning: 1 warning emitted

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

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion src/test/ui/lint/force-warn/force-warn-group.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | pub fn function(_x: Box<SomeTrait>) {}
|
= note: `--force-warn bare-trait-objects` implied by `--force-warn rust-2018-idioms`
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

warning: 1 warning emitted

4 changes: 2 additions & 2 deletions src/test/ui/lint/inclusive-range-pattern-syntax.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: the lint level is defined here
LL | #![warn(ellipsis_inclusive_range_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>

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

warning: 2 warnings emitted

Loading

0 comments on commit 260f9b9

Please sign in to comment.