From e7adb0259f10c5ff3c74f373c2c345887c336382 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Thu, 24 Jun 2021 16:45:19 +0200 Subject: [PATCH] Fix new broken tests --- .../macro-or-patterns-back-compat.fixed | 8 ++--- .../macros/macro-or-patterns-back-compat.rs | 8 ++--- .../macro-or-patterns-back-compat.stderr | 8 ++--- .../future-prelude-collision-imported.fixed | 6 ++-- .../future-prelude-collision-imported.rs | 6 ++-- .../future-prelude-collision-imported.stderr | 6 ++-- .../rust-2021/future-prelude-collision.fixed | 22 +++++++------ .../ui/rust-2021/future-prelude-collision.rs | 22 +++++++------ .../rust-2021/future-prelude-collision.stderr | 32 +++++++++---------- .../ui/rust-2021/generic-type-collision.fixed | 2 +- .../ui/rust-2021/generic-type-collision.rs | 2 +- .../rust-2021/generic-type-collision.stderr | 2 +- .../ui/rust-2021/inherent-dyn-collision.fixed | 2 +- .../ui/rust-2021/inherent-dyn-collision.rs | 2 +- .../rust-2021/inherent-dyn-collision.stderr | 2 +- 15 files changed, 67 insertions(+), 63 deletions(-) diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.fixed b/src/test/ui/macros/macro-or-patterns-back-compat.fixed index f4e81a6be2a89..e18fbecf032cd 100644 --- a/src/test/ui/macros/macro-or-patterns-back-compat.fixed +++ b/src/test/ui/macros/macro-or-patterns-back-compat.fixed @@ -5,19 +5,19 @@ macro_rules! foo { ($x:pat_param | $y:pat) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! bar { ($($x:pat_param)+ | $($y:pat)+) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok macro_rules! qux { ($x:pat_param | $y:pat) => {} } // should be ok macro_rules! ogg { ($x:pat_param | $y:pat_param) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! match_any { ( $expr:expr , $( $( $pat:pat_param )|+ => $expr_arm:expr ),+ ) => { //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition match $expr { $( $( $pat => $expr_arm, )+ diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.rs b/src/test/ui/macros/macro-or-patterns-back-compat.rs index 49affdd38da9d..4b3aeb62043fb 100644 --- a/src/test/ui/macros/macro-or-patterns-back-compat.rs +++ b/src/test/ui/macros/macro-or-patterns-back-compat.rs @@ -5,19 +5,19 @@ macro_rules! foo { ($x:pat | $y:pat) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok macro_rules! qux { ($x:pat_param | $y:pat) => {} } // should be ok macro_rules! ogg { ($x:pat | $y:pat_param) => {} } //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro -//~| WARN this was previously accepted +//~| WARN this is accepted in the current edition macro_rules! match_any { ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => { //~^ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro - //~| WARN this was previously accepted + //~| WARN this is accepted in the current edition match $expr { $( $( $pat => $expr_arm, )+ diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.stderr b/src/test/ui/macros/macro-or-patterns-back-compat.stderr index 62687eb36b89e..857ff8313d96a 100644 --- a/src/test/ui/macros/macro-or-patterns-back-compat.stderr +++ b/src/test/ui/macros/macro-or-patterns-back-compat.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![deny(or_patterns_back_compat)] | ^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #84869 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro @@ -18,7 +18,7 @@ error: the meaning of the `pat` fragment specifier is changing in Rust 2021, whi LL | macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } | ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #84869 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro @@ -27,7 +27,7 @@ error: the meaning of the `pat` fragment specifier is changing in Rust 2021, whi LL | macro_rules! ogg { ($x:pat | $y:pat_param) => {} } | ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #84869 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro @@ -36,7 +36,7 @@ error: the meaning of the `pat` fragment specifier is changing in Rust 2021, whi LL | ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => { | ^^^^^^^^ help: use pat_param to preserve semantics: `$pat:pat_param` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #84869 error: aborting due to 4 previous errors diff --git a/src/test/ui/rust-2021/future-prelude-collision-imported.fixed b/src/test/ui/rust-2021/future-prelude-collision-imported.fixed index 4f8fd9b345b28..725d5aa234eee 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-imported.fixed +++ b/src/test/ui/rust-2021/future-prelude-collision-imported.fixed @@ -26,7 +26,7 @@ mod a { // In this case, we can just use `TryIntoU32` let _: u32 = TryIntoU32::try_into(3u8).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } @@ -39,7 +39,7 @@ mod b { // the path `crate::m::TryIntoU32` (with which it was imported). let _: u32 = crate::m::TryIntoU32::try_into(3u8).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } @@ -52,7 +52,7 @@ mod c { // the path `super::m::TryIntoU32` (with which it was imported). let _: u32 = super::m::TryIntoU32::try_into(3u8).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } diff --git a/src/test/ui/rust-2021/future-prelude-collision-imported.rs b/src/test/ui/rust-2021/future-prelude-collision-imported.rs index 2ce1be6151b11..6ca9a919f3cd7 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-imported.rs +++ b/src/test/ui/rust-2021/future-prelude-collision-imported.rs @@ -26,7 +26,7 @@ mod a { // In this case, we can just use `TryIntoU32` let _: u32 = 3u8.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } @@ -39,7 +39,7 @@ mod b { // the path `crate::m::TryIntoU32` (with which it was imported). let _: u32 = 3u8.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } @@ -52,7 +52,7 @@ mod c { // the path `super::m::TryIntoU32` (with which it was imported). let _: u32 = 3u8.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } } diff --git a/src/test/ui/rust-2021/future-prelude-collision-imported.stderr b/src/test/ui/rust-2021/future-prelude-collision-imported.stderr index 3903cbfe82490..8889485c91729 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-imported.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-imported.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![warn(future_prelude_collision)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 @@ -18,7 +18,7 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `crate::m::TryIntoU32::try_into(3u8)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 @@ -27,7 +27,7 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `super::m::TryIntoU32::try_into(3u8)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: 3 warnings emitted diff --git a/src/test/ui/rust-2021/future-prelude-collision.fixed b/src/test/ui/rust-2021/future-prelude-collision.fixed index 9ede9f3a2fb45..4bcbe6b094afd 100644 --- a/src/test/ui/rust-2021/future-prelude-collision.fixed +++ b/src/test/ui/rust-2021/future-prelude-collision.fixed @@ -38,12 +38,14 @@ impl TryIntoU32 for *const u16 { trait FromByteIterator { fn from_iter(iter: T) -> Self - where T: Iterator; + where + T: Iterator; } impl FromByteIterator for Vec { fn from_iter(iter: T) -> Self - where T: Iterator + where + T: Iterator, { iter.collect() } @@ -53,17 +55,17 @@ fn main() { // test dot-call that will break in 2021 edition let _: u32 = TryIntoU32::try_into(3u8).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test associated function call that will break in 2021 edition let _ = ::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test reverse turbofish too let _ = as FromByteIterator>::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter()); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // negative testing lint (this line should *not* emit a warning) let _: u32 = TryFromU8::try_from(3u8).unwrap(); @@ -71,26 +73,26 @@ fn main() { // test type omission let _: u32 = <_ as TryFromU8>::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test autoderef let _: u32 = TryIntoU32::try_into(*(&3u8)).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test autoref let _: u32 = TryIntoU32::try_into(&3.0).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition let mut data = 3u16; let mut_ptr = std::ptr::addr_of_mut!(data); let _: u32 = TryIntoU32::try_into(mut_ptr as *const _).unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition type U32Alias = u32; let _ = ::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2021/future-prelude-collision.rs b/src/test/ui/rust-2021/future-prelude-collision.rs index 914e910396a66..bc23a8a92a6b5 100644 --- a/src/test/ui/rust-2021/future-prelude-collision.rs +++ b/src/test/ui/rust-2021/future-prelude-collision.rs @@ -38,12 +38,14 @@ impl TryIntoU32 for *const u16 { trait FromByteIterator { fn from_iter(iter: T) -> Self - where T: Iterator; + where + T: Iterator; } impl FromByteIterator for Vec { fn from_iter(iter: T) -> Self - where T: Iterator + where + T: Iterator, { iter.collect() } @@ -53,17 +55,17 @@ fn main() { // test dot-call that will break in 2021 edition let _: u32 = 3u8.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test associated function call that will break in 2021 edition let _ = u32::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test reverse turbofish too let _ = >::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter()); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // negative testing lint (this line should *not* emit a warning) let _: u32 = TryFromU8::try_from(3u8).unwrap(); @@ -71,26 +73,26 @@ fn main() { // test type omission let _: u32 = <_>::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test autoderef let _: u32 = (&3u8).try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition // test autoref let _: u32 = 3.0.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition let mut data = 3u16; let mut_ptr = std::ptr::addr_of_mut!(data); let _: u32 = mut_ptr.try_into().unwrap(); //~^ WARNING trait method `try_into` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition type U32Alias = u32; let _ = U32Alias::try_from(3u8).unwrap(); //~^ WARNING trait-associated function `try_from` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2021/future-prelude-collision.stderr b/src/test/ui/rust-2021/future-prelude-collision.stderr index 190145ef4dbfc..e167468ab1971 100644 --- a/src/test/ui/rust-2021/future-prelude-collision.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision.stderr @@ -1,5 +1,5 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:54:18 + --> $DIR/future-prelude-collision.rs:56:18 | LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(3u8)` @@ -9,70 +9,70 @@ note: the lint level is defined here | LL | #![warn(future_prelude_collision)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait-associated function `try_from` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:59:13 + --> $DIR/future-prelude-collision.rs:61:13 | LL | let _ = u32::try_from(3u8).unwrap(); | ^^^^^^^^^^^^^ help: disambiguate the associated function: `::try_from` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait-associated function `from_iter` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:64:13 + --> $DIR/future-prelude-collision.rs:66:13 | LL | let _ = >::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter()); | ^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: ` as FromByteIterator>::from_iter` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait-associated function `try_from` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:72:18 + --> $DIR/future-prelude-collision.rs:74:18 | LL | let _: u32 = <_>::try_from(3u8).unwrap(); | ^^^^^^^^^^^^^ help: disambiguate the associated function: `<_ as TryFromU8>::try_from` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:77:18 + --> $DIR/future-prelude-collision.rs:79:18 | LL | let _: u32 = (&3u8).try_into().unwrap(); | ^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(*(&3u8))` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:82:18 + --> $DIR/future-prelude-collision.rs:84:18 | LL | let _: u32 = 3.0.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(&3.0)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait method `try_into` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:88:18 + --> $DIR/future-prelude-collision.rs:90:18 | LL | let _: u32 = mut_ptr.try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(mut_ptr as *const _)` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: trait-associated function `try_from` will become ambiguous in Rust 2021 - --> $DIR/future-prelude-collision.rs:93:13 + --> $DIR/future-prelude-collision.rs:95:13 | LL | let _ = U32Alias::try_from(3u8).unwrap(); | ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `::try_from` | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: 8 warnings emitted diff --git a/src/test/ui/rust-2021/generic-type-collision.fixed b/src/test/ui/rust-2021/generic-type-collision.fixed index 00fb128a981e1..d1a085f23a01c 100644 --- a/src/test/ui/rust-2021/generic-type-collision.fixed +++ b/src/test/ui/rust-2021/generic-type-collision.fixed @@ -14,5 +14,5 @@ impl MyTrait<()> for Vec { fn main() { as MyTrait<_>>::from_iter(None); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2021/generic-type-collision.rs b/src/test/ui/rust-2021/generic-type-collision.rs index 406fba4d2479b..5069fba396ec6 100644 --- a/src/test/ui/rust-2021/generic-type-collision.rs +++ b/src/test/ui/rust-2021/generic-type-collision.rs @@ -14,5 +14,5 @@ impl MyTrait<()> for Vec { fn main() { >::from_iter(None); //~^ WARNING trait-associated function `from_iter` will become ambiguous in Rust 2021 - //~^^ WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + //~^^ WARNING this is accepted in the current edition } diff --git a/src/test/ui/rust-2021/generic-type-collision.stderr b/src/test/ui/rust-2021/generic-type-collision.stderr index 9374379d24763..05591c3d4487d 100644 --- a/src/test/ui/rust-2021/generic-type-collision.stderr +++ b/src/test/ui/rust-2021/generic-type-collision.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![warn(future_prelude_collision)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: 1 warning emitted diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.fixed b/src/test/ui/rust-2021/inherent-dyn-collision.fixed index cbb6e9659dff3..cf6287a758f91 100644 --- a/src/test/ui/rust-2021/inherent-dyn-collision.fixed +++ b/src/test/ui/rust-2021/inherent-dyn-collision.fixed @@ -40,7 +40,7 @@ mod inner { pub fn test() -> u32 { (&*get_dyn_trait()).try_into().unwrap() //~^ WARNING trait method `try_into` will become ambiguous - //~| WARNING this was previously accepted + //~| WARNING this is accepted in the current edition } } diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.rs b/src/test/ui/rust-2021/inherent-dyn-collision.rs index 1c9929eff91de..0349ad5b6415a 100644 --- a/src/test/ui/rust-2021/inherent-dyn-collision.rs +++ b/src/test/ui/rust-2021/inherent-dyn-collision.rs @@ -40,7 +40,7 @@ mod inner { pub fn test() -> u32 { get_dyn_trait().try_into().unwrap() //~^ WARNING trait method `try_into` will become ambiguous - //~| WARNING this was previously accepted + //~| WARNING this is accepted in the current edition } } diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.stderr b/src/test/ui/rust-2021/inherent-dyn-collision.stderr index 3d7637100c2c9..9e95419715e31 100644 --- a/src/test/ui/rust-2021/inherent-dyn-collision.stderr +++ b/src/test/ui/rust-2021/inherent-dyn-collision.stderr @@ -9,7 +9,7 @@ note: the lint level is defined here | LL | #![warn(future_prelude_collision)] | ^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see issue #85684 warning: 1 warning emitted