Skip to content

Commit 4498e30

Browse files
committed
Auto merge of #87963 - GuillaumeGomez:rollup-e54sbez, r=GuillaumeGomez
Rollup of 4 pull requests Successful merges: - #87819 (Use a more accurate span on assoc types WF checks) - #87863 (Fix Windows Command::env("PATH")) - #87885 (Link to edition guide instead of issues for 2021 lints.) - #87941 (Fix/improve rustdoc-js tool) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 6bed1f0 + faf7fb9 commit 4498e30

File tree

54 files changed

+189
-161
lines changed

Some content is hidden

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

54 files changed

+189
-161
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

compiler/rustc_typeck/src/check/wfcheck.rs

+10-8
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,13 @@ pub fn check_trait_item(tcx: TyCtxt<'_>, def_id: LocalDefId) {
194194
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
195195
let trait_item = tcx.hir().expect_trait_item(hir_id);
196196

197-
let method_sig = match trait_item.kind {
198-
hir::TraitItemKind::Fn(ref sig, _) => Some(sig),
199-
_ => None,
197+
let (method_sig, span) = match trait_item.kind {
198+
hir::TraitItemKind::Fn(ref sig, _) => (Some(sig), trait_item.span),
199+
hir::TraitItemKind::Type(_bounds, Some(ty)) => (None, ty.span),
200+
_ => (None, trait_item.span),
200201
};
201202
check_object_unsafe_self_trait_by_name(tcx, &trait_item);
202-
check_associated_item(tcx, trait_item.hir_id(), trait_item.span, method_sig);
203+
check_associated_item(tcx, trait_item.hir_id(), span, method_sig);
203204
}
204205

205206
fn could_be_self(trait_def_id: LocalDefId, ty: &hir::Ty<'_>) -> bool {
@@ -268,12 +269,13 @@ pub fn check_impl_item(tcx: TyCtxt<'_>, def_id: LocalDefId) {
268269
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
269270
let impl_item = tcx.hir().expect_impl_item(hir_id);
270271

271-
let method_sig = match impl_item.kind {
272-
hir::ImplItemKind::Fn(ref sig, _) => Some(sig),
273-
_ => None,
272+
let (method_sig, span) = match impl_item.kind {
273+
hir::ImplItemKind::Fn(ref sig, _) => (Some(sig), impl_item.span),
274+
hir::ImplItemKind::TyAlias(ty) => (None, ty.span),
275+
_ => (None, impl_item.span),
274276
};
275277

276-
check_associated_item(tcx, impl_item.hir_id(), impl_item.span, method_sig);
278+
check_associated_item(tcx, impl_item.hir_id(), span, method_sig);
277279
}
278280

279281
fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) {

library/std/src/sys/windows/process.rs

+24-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#[cfg(test)]
44
mod tests;
55

6-
use crate::borrow::Borrow;
76
use crate::cmp;
87
use crate::collections::BTreeMap;
98
use crate::convert::{TryFrom, TryInto};
@@ -46,6 +45,12 @@ pub struct EnvKey {
4645
utf16: Vec<u16>,
4746
}
4847

48+
impl EnvKey {
49+
fn new<T: Into<OsString>>(key: T) -> Self {
50+
EnvKey::from(key.into())
51+
}
52+
}
53+
4954
// Comparing Windows environment variable keys[1] are behaviourally the
5055
// composition of two operations[2]:
5156
//
@@ -100,6 +105,20 @@ impl PartialEq for EnvKey {
100105
}
101106
}
102107
}
108+
impl PartialOrd<str> for EnvKey {
109+
fn partial_cmp(&self, other: &str) -> Option<cmp::Ordering> {
110+
Some(self.cmp(&EnvKey::new(other)))
111+
}
112+
}
113+
impl PartialEq<str> for EnvKey {
114+
fn eq(&self, other: &str) -> bool {
115+
if self.os_string.len() != other.len() {
116+
false
117+
} else {
118+
self.cmp(&EnvKey::new(other)) == cmp::Ordering::Equal
119+
}
120+
}
121+
}
103122

104123
// Environment variable keys should preserve their original case even though
105124
// they are compared using a caseless string mapping.
@@ -115,9 +134,9 @@ impl From<EnvKey> for OsString {
115134
}
116135
}
117136

118-
impl Borrow<OsStr> for EnvKey {
119-
fn borrow(&self) -> &OsStr {
120-
&self.os_string
137+
impl From<&OsStr> for EnvKey {
138+
fn from(k: &OsStr) -> Self {
139+
Self::from(k.to_os_string())
121140
}
122141
}
123142

@@ -242,7 +261,7 @@ impl Command {
242261
// to read the *child's* PATH if one is provided. See #15149 for more
243262
// details.
244263
let program = maybe_env.as_ref().and_then(|env| {
245-
if let Some(v) = env.get(OsStr::new("PATH")) {
264+
if let Some(v) = env.get(&EnvKey::new("PATH")) {
246265
// Split the value and test each path to see if the
247266
// program exists.
248267
for path in split_paths(&v) {

library/std/src/sys_common/process.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,18 @@ impl CommandEnv {
6565

6666
// The following functions build up changes
6767
pub fn set(&mut self, key: &OsStr, value: &OsStr) {
68+
let key = EnvKey::from(key);
6869
self.maybe_saw_path(&key);
69-
self.vars.insert(key.to_owned().into(), Some(value.to_owned()));
70+
self.vars.insert(key, Some(value.to_owned()));
7071
}
7172

7273
pub fn remove(&mut self, key: &OsStr) {
74+
let key = EnvKey::from(key);
7375
self.maybe_saw_path(&key);
7476
if self.clear {
75-
self.vars.remove(key);
77+
self.vars.remove(&key);
7678
} else {
77-
self.vars.insert(key.to_owned().into(), None);
79+
self.vars.insert(key, None);
7880
}
7981
}
8082

@@ -87,7 +89,7 @@ impl CommandEnv {
8789
self.saw_path || self.clear
8890
}
8991

90-
fn maybe_saw_path(&mut self, key: &OsStr) {
92+
fn maybe_saw_path(&mut self, key: &EnvKey) {
9193
if !self.saw_path && key == "PATH" {
9294
self.saw_path = true;
9395
}

src/test/ui/associated-types/defaults-cyclic-fail-1.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
2-
--> $DIR/defaults-cyclic-fail-1.rs:26:5
2+
--> $DIR/defaults-cyclic-fail-1.rs:26:14
33
|
44
LL | type A = Box<Self::B>;
5-
| ^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^
66

77
error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
8-
--> $DIR/defaults-cyclic-fail-1.rs:32:5
8+
--> $DIR/defaults-cyclic-fail-1.rs:32:14
99
|
1010
LL | type B = &'static Self::A;
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
11+
| ^^^^^^^^^^^^^^^^
1212

1313
error: aborting due to 2 previous errors
1414

src/test/ui/associated-types/defaults-cyclic-fail-2.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
2-
--> $DIR/defaults-cyclic-fail-2.rs:27:5
2+
--> $DIR/defaults-cyclic-fail-2.rs:27:14
33
|
44
LL | type A = Box<Self::B>;
5-
| ^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^
66

77
error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
8-
--> $DIR/defaults-cyclic-fail-2.rs:33:5
8+
--> $DIR/defaults-cyclic-fail-2.rs:33:14
99
|
1010
LL | type B = &'static Self::A;
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
11+
| ^^^^^^^^^^^^^^^^
1212

1313
error: aborting due to 2 previous errors
1414

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/generic-associated-types/projection-bound-cycle-generic.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
2-
--> $DIR/projection-bound-cycle-generic.rs:44:5
2+
--> $DIR/projection-bound-cycle-generic.rs:44:18
33
|
44
LL | struct OnlySized<T> where T: Sized { f: T }
55
| - required by this bound in `OnlySized`
66
...
77
LL | type Assoc = OnlySized<<T as Foo>::Item>;
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
99

1010
error: aborting due to previous error
1111

src/test/ui/generic-associated-types/projection-bound-cycle.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
2-
--> $DIR/projection-bound-cycle.rs:46:5
2+
--> $DIR/projection-bound-cycle.rs:46:18
33
|
44
LL | struct OnlySized<T> where T: Sized { f: T }
55
| - required by this bound in `OnlySized`
66
...
77
LL | type Assoc = OnlySized<<T as Foo>::Item>;
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
99

1010
error: aborting due to previous error
1111

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _`
2-
--> $DIR/issue-21946.rs:8:5
2+
--> $DIR/issue-21946.rs:8:14
33
|
44
LL | type A = <FooStruct as Foo>::A;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to previous error
88

src/test/ui/issues/issue-23122-1.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next == _`
2-
--> $DIR/issue-23122-1.rs:10:5
2+
--> $DIR/issue-23122-1.rs:10:17
33
|
44
LL | type Next = <GetNext<T> as Next>::Next;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to previous error
88

src/test/ui/issues/issue-23122-2.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized`
2-
--> $DIR/issue-23122-2.rs:9:5
2+
--> $DIR/issue-23122-2.rs:9:17
33
|
44
LL | type Next = <GetNext<T::Next> as Next>::Next;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_23122_2`)
88
note: required because of the requirements on the impl of `Next` for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>`

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() {}

0 commit comments

Comments
 (0)