Add s to FUTURE_PRELUDE_COLLISION

This commit is contained in:
Ryan Levick 2021-06-29 16:53:44 +02:00
parent 1d49658f5c
commit ecca9a8b1a
17 changed files with 30 additions and 28 deletions

View file

@ -1,7 +1,7 @@
// run-rustfix
// edition:2018
// check-pass
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
#![allow(dead_code)]
#![allow(unused_imports)]

View file

@ -1,7 +1,7 @@
// run-rustfix
// edition:2018
// check-pass
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
#![allow(dead_code)]
#![allow(unused_imports)]

View file

@ -7,8 +7,8 @@ LL | let _: u32 = 3u8.try_into().unwrap();
note: the lint level is defined here
--> $DIR/future-prelude-collision-imported.rs:4:9
|
LL | #![warn(future_prelude_collision)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![warn(future_prelude_collisions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= 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 <https://github.com/rust-lang/rust/issues/85684>

View file

@ -1,5 +1,5 @@
// edition:2018
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
#![allow(dead_code)]
#![allow(unused_imports)]

View file

@ -1,12 +1,14 @@
// edition:2018
// check-pass
#![allow(unused)]
#![deny(future_prelude_collision)]
#![deny(future_prelude_collisions)]
struct S;
impl S {
fn try_into(self) -> S { S }
fn try_into(self) -> S {
S
}
}
// See https://github.com/rust-lang/rust/issues/86633

View file

@ -1,7 +1,7 @@
// run-rustfix
// edition:2018
// check-pass
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
trait TryIntoU32 {
fn try_into(self) -> Result<u32, ()>;

View file

@ -1,7 +1,7 @@
// run-rustfix
// edition:2018
// check-pass
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
trait TryIntoU32 {
fn try_into(self) -> Result<u32, ()>;

View file

@ -7,8 +7,8 @@ LL | let _: u32 = 3u8.try_into().unwrap();
note: the lint level is defined here
--> $DIR/future-prelude-collision.rs:4:9
|
LL | #![warn(future_prelude_collision)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![warn(future_prelude_collisions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= 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 <https://github.com/rust-lang/rust/issues/85684>

View file

@ -1,7 +1,7 @@
// check-pass
// run-rustfix
// edition 2018
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
trait MyTrait<A> {
fn from_iter(x: Option<A>);

View file

@ -1,7 +1,7 @@
// check-pass
// run-rustfix
// edition 2018
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
trait MyTrait<A> {
fn from_iter(x: Option<A>);

View file

@ -7,8 +7,8 @@ LL | <Vec<i32>>::from_iter(None);
note: the lint level is defined here
--> $DIR/generic-type-collision.rs:4:9
|
LL | #![warn(future_prelude_collision)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![warn(future_prelude_collisions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= 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 <https://github.com/rust-lang/rust/issues/85684>

View file

@ -5,7 +5,7 @@
// run-rustfix
// edition:2018
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
trait TryIntoU32 {
fn try_into(&self) -> Result<u32, ()>;

View file

@ -5,7 +5,7 @@
// run-rustfix
// edition:2018
#![warn(future_prelude_collision)]
#![warn(future_prelude_collisions)]
trait TryIntoU32 {
fn try_into(&self) -> Result<u32, ()>;

View file

@ -7,8 +7,8 @@ LL | get_dyn_trait().try_into().unwrap()
note: the lint level is defined here
--> $DIR/inherent-dyn-collision.rs:8:9
|
LL | #![warn(future_prelude_collision)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![warn(future_prelude_collisions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= 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 <https://github.com/rust-lang/rust/issues/85684>

View file

@ -2,7 +2,7 @@
//
// check-pass
#![deny(future_prelude_collision)]
#![deny(future_prelude_collisions)]
pub struct MySeq {}