about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Levick <me@ryanlevick.com>2021-07-01 13:35:33 +0200
committerRyan Levick <me@ryanlevick.com>2021-07-06 20:13:17 +0200
commit941eb2adbd10988167e0fe23b87e795203df3977 (patch)
treec82031764b4507f67f729c34245c613ab3f5eda6
parent81c11a212eda360ee3808dacf8065685f4a2e07b (diff)
downloadrust-941eb2adbd10988167e0fe23b87e795203df3977.tar.gz
rust-941eb2adbd10988167e0fe23b87e795203df3977.zip
Rename future_prelude_collisions to rust_2021_prelude_collisions
-rw-r--r--compiler/rustc_lint_defs/src/builtin.rs8
-rw-r--r--compiler/rustc_typeck/src/check/method/prelude2021.rs8
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision-imported.fixed2
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision-imported.rs2
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision-imported.stderr4
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision-shadow.rs2
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision-unneeded.rs2
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision.fixed2
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision.rs2
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision.stderr4
-rw-r--r--src/test/ui/rust-2021/generic-type-collision.fixed2
-rw-r--r--src/test/ui/rust-2021/generic-type-collision.rs2
-rw-r--r--src/test/ui/rust-2021/generic-type-collision.stderr4
-rw-r--r--src/test/ui/rust-2021/inherent-dyn-collision.fixed2
-rw-r--r--src/test/ui/rust-2021/inherent-dyn-collision.rs2
-rw-r--r--src/test/ui/rust-2021/inherent-dyn-collision.stderr4
-rw-r--r--src/test/ui/rust-2021/inherent-method-collision.rs2
17 files changed, 27 insertions, 27 deletions
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs
index 9d809e388a1..3e30b6553db 100644
--- a/compiler/rustc_lint_defs/src/builtin.rs
+++ b/compiler/rustc_lint_defs/src/builtin.rs
@@ -2972,7 +2972,7 @@ declare_lint_pass! {
         PROC_MACRO_BACK_COMPAT,
         RUST_2021_INCOMPATIBLE_OR_PATTERNS,
         LARGE_ASSIGNMENTS,
-        FUTURE_PRELUDE_COLLISIONS,
+        RUST_2021_PRELUDE_COLLISIONS,
         RUST_2021_TOKEN_PREFIXES,
         UNSUPPORTED_CALLING_CONVENTIONS,
     ]
@@ -3221,13 +3221,13 @@ declare_lint! {
 }
 
 declare_lint! {
-    /// The `future_prelude_collisions` lint detects the usage of trait methods which are ambiguous
+    /// The `rust_2021_prelude_collisions` lint detects the usage of trait methods which are ambiguous
     /// with traits added to the prelude in future editions.
     ///
     /// ### Example
     ///
     /// ```rust,compile_fail
-    /// #![deny(future_prelude_collisions)]
+    /// #![deny(rust_2021_prelude_collisions)]
     ///
     /// trait Foo {
     ///     fn try_into(self) -> Result<String, !>;
@@ -3259,7 +3259,7 @@ declare_lint! {
     ///  is called directly on a type.
     ///
     /// [prelude changes]: https://blog.rust-lang.org/inside-rust/2021/03/04/planning-rust-2021.html#prelude-changes
-    pub FUTURE_PRELUDE_COLLISIONS,
+    pub RUST_2021_PRELUDE_COLLISIONS,
     Allow,
     "detects the usage of trait methods which are ambiguous with traits added to the \
         prelude in future editions",
diff --git a/compiler/rustc_typeck/src/check/method/prelude2021.rs b/compiler/rustc_typeck/src/check/method/prelude2021.rs
index cf17ff2eab5..6ca0b3ed66b 100644
--- a/compiler/rustc_typeck/src/check/method/prelude2021.rs
+++ b/compiler/rustc_typeck/src/check/method/prelude2021.rs
@@ -5,7 +5,7 @@ use rustc_ast::Mutability;
 use rustc_errors::Applicability;
 use rustc_hir as hir;
 use rustc_middle::ty::{Ref, Ty};
-use rustc_session::lint::builtin::FUTURE_PRELUDE_COLLISIONS;
+use rustc_session::lint::builtin::RUST_2021_PRELUDE_COLLISIONS;
 use rustc_span::symbol::kw::Underscore;
 use rustc_span::symbol::{sym, Ident};
 use rustc_span::Span;
@@ -67,7 +67,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             // Inherent impls only require not relying on autoref and autoderef in order to
             // ensure that the trait implementation won't be used
             self.tcx.struct_span_lint_hir(
-                FUTURE_PRELUDE_COLLISIONS,
+                RUST_2021_PRELUDE_COLLISIONS,
                 self_expr.hir_id,
                 self_expr.span,
                 |lint| {
@@ -128,7 +128,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             // trait implementations require full disambiguation to not clash with the new prelude
             // additions (i.e. convert from dot-call to fully-qualified call)
             self.tcx.struct_span_lint_hir(
-                FUTURE_PRELUDE_COLLISIONS,
+                RUST_2021_PRELUDE_COLLISIONS,
                 call_expr.hir_id,
                 call_expr.span,
                 |lint| {
@@ -212,7 +212,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             return;
         }
 
-        self.tcx.struct_span_lint_hir(FUTURE_PRELUDE_COLLISIONS, expr_id, span, |lint| {
+        self.tcx.struct_span_lint_hir(RUST_2021_PRELUDE_COLLISIONS, expr_id, span, |lint| {
             // "type" refers to either a type or, more likely, a trait from which
             // the associated function or method is from.
             let trait_path = self.trait_path_or_bare_name(span, expr_id, pick.item.container.id());
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 e37b4cd0960..c5ff0b4bcd0 100644
--- a/src/test/ui/rust-2021/future-prelude-collision-imported.fixed
+++ b/src/test/ui/rust-2021/future-prelude-collision-imported.fixed
@@ -1,7 +1,7 @@
 // run-rustfix
 // edition:2018
 // check-pass
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 #![allow(dead_code)]
 #![allow(unused_imports)]
 
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 a560c4b92e1..cd39eec47f2 100644
--- a/src/test/ui/rust-2021/future-prelude-collision-imported.rs
+++ b/src/test/ui/rust-2021/future-prelude-collision-imported.rs
@@ -1,7 +1,7 @@
 // run-rustfix
 // edition:2018
 // check-pass
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 #![allow(dead_code)]
 #![allow(unused_imports)]
 
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 da455f2d15a..61975876819 100644
--- a/src/test/ui/rust-2021/future-prelude-collision-imported.stderr
+++ b/src/test/ui/rust-2021/future-prelude-collision-imported.stderr
@@ -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_collisions)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #![warn(rust_2021_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>
 
diff --git a/src/test/ui/rust-2021/future-prelude-collision-shadow.rs b/src/test/ui/rust-2021/future-prelude-collision-shadow.rs
index 7e64f9ae7bf..27891a8d11d 100644
--- a/src/test/ui/rust-2021/future-prelude-collision-shadow.rs
+++ b/src/test/ui/rust-2021/future-prelude-collision-shadow.rs
@@ -1,5 +1,5 @@
 // edition:2018
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 #![allow(dead_code)]
 #![allow(unused_imports)]
 
diff --git a/src/test/ui/rust-2021/future-prelude-collision-unneeded.rs b/src/test/ui/rust-2021/future-prelude-collision-unneeded.rs
index 1c809d0ba09..4be82056ad5 100644
--- a/src/test/ui/rust-2021/future-prelude-collision-unneeded.rs
+++ b/src/test/ui/rust-2021/future-prelude-collision-unneeded.rs
@@ -1,7 +1,7 @@
 // edition:2018
 // check-pass
 #![allow(unused)]
-#![deny(future_prelude_collisions)]
+#![deny(rust_2021_prelude_collisions)]
 
 struct S;
 
diff --git a/src/test/ui/rust-2021/future-prelude-collision.fixed b/src/test/ui/rust-2021/future-prelude-collision.fixed
index c8f29c325d9..43b0ec1c3e6 100644
--- a/src/test/ui/rust-2021/future-prelude-collision.fixed
+++ b/src/test/ui/rust-2021/future-prelude-collision.fixed
@@ -1,7 +1,7 @@
 // run-rustfix
 // edition:2018
 // check-pass
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 
 trait TryIntoU32 {
     fn try_into(self) -> Result<u32, ()>;
diff --git a/src/test/ui/rust-2021/future-prelude-collision.rs b/src/test/ui/rust-2021/future-prelude-collision.rs
index 7059535b877..4c7a47ffbe2 100644
--- a/src/test/ui/rust-2021/future-prelude-collision.rs
+++ b/src/test/ui/rust-2021/future-prelude-collision.rs
@@ -1,7 +1,7 @@
 // run-rustfix
 // edition:2018
 // check-pass
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 
 trait TryIntoU32 {
     fn try_into(self) -> Result<u32, ()>;
diff --git a/src/test/ui/rust-2021/future-prelude-collision.stderr b/src/test/ui/rust-2021/future-prelude-collision.stderr
index 46e52baf838..03b89da00d9 100644
--- a/src/test/ui/rust-2021/future-prelude-collision.stderr
+++ b/src/test/ui/rust-2021/future-prelude-collision.stderr
@@ -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_collisions)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #![warn(rust_2021_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>
 
diff --git a/src/test/ui/rust-2021/generic-type-collision.fixed b/src/test/ui/rust-2021/generic-type-collision.fixed
index 9851a1d42b6..feba7d19b66 100644
--- a/src/test/ui/rust-2021/generic-type-collision.fixed
+++ b/src/test/ui/rust-2021/generic-type-collision.fixed
@@ -1,7 +1,7 @@
 // check-pass
 // run-rustfix
 // edition 2018
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 
 trait MyTrait<A> {
     fn from_iter(x: Option<A>);
diff --git a/src/test/ui/rust-2021/generic-type-collision.rs b/src/test/ui/rust-2021/generic-type-collision.rs
index 18deaa55cfe..335e7e520a4 100644
--- a/src/test/ui/rust-2021/generic-type-collision.rs
+++ b/src/test/ui/rust-2021/generic-type-collision.rs
@@ -1,7 +1,7 @@
 // check-pass
 // run-rustfix
 // edition 2018
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 
 trait MyTrait<A> {
     fn from_iter(x: Option<A>);
diff --git a/src/test/ui/rust-2021/generic-type-collision.stderr b/src/test/ui/rust-2021/generic-type-collision.stderr
index 1839c3e7279..d4999201c27 100644
--- a/src/test/ui/rust-2021/generic-type-collision.stderr
+++ b/src/test/ui/rust-2021/generic-type-collision.stderr
@@ -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_collisions)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #![warn(rust_2021_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>
 
diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.fixed b/src/test/ui/rust-2021/inherent-dyn-collision.fixed
index d6be9e56f96..5789a90393b 100644
--- a/src/test/ui/rust-2021/inherent-dyn-collision.fixed
+++ b/src/test/ui/rust-2021/inherent-dyn-collision.fixed
@@ -5,7 +5,7 @@
 // run-rustfix
 // edition:2018
 
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 
 trait TryIntoU32 {
     fn try_into(&self) -> Result<u32, ()>;
diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.rs b/src/test/ui/rust-2021/inherent-dyn-collision.rs
index 67be6157d45..a3893c033e9 100644
--- a/src/test/ui/rust-2021/inherent-dyn-collision.rs
+++ b/src/test/ui/rust-2021/inherent-dyn-collision.rs
@@ -5,7 +5,7 @@
 // run-rustfix
 // edition:2018
 
-#![warn(future_prelude_collisions)]
+#![warn(rust_2021_prelude_collisions)]
 
 trait TryIntoU32 {
     fn try_into(&self) -> Result<u32, ()>;
diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.stderr b/src/test/ui/rust-2021/inherent-dyn-collision.stderr
index 4d7a04735ac..605f9ced9eb 100644
--- a/src/test/ui/rust-2021/inherent-dyn-collision.stderr
+++ b/src/test/ui/rust-2021/inherent-dyn-collision.stderr
@@ -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_collisions)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #![warn(rust_2021_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>
 
diff --git a/src/test/ui/rust-2021/inherent-method-collision.rs b/src/test/ui/rust-2021/inherent-method-collision.rs
index f99d98bd890..507105207d6 100644
--- a/src/test/ui/rust-2021/inherent-method-collision.rs
+++ b/src/test/ui/rust-2021/inherent-method-collision.rs
@@ -2,7 +2,7 @@
 //
 // check-pass
 
-#![deny(future_prelude_collisions)]
+#![deny(rust_2021_prelude_collisions)]
 
 pub struct MySeq {}