about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_feature/src/active.rs1
-rw-r--r--src/test/ui/error-codes/E0161.rs2
-rw-r--r--src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs1
-rw-r--r--src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr29
-rw-r--r--src/test/ui/moves/move-out-of-slice-2.rs9
-rw-r--r--src/test/ui/moves/move-out-of-slice-2.stderr27
-rw-r--r--src/test/ui/unsized-locals/autoderef.rs1
-rw-r--r--src/test/ui/unsized-locals/borrow-after-move.rs1
-rw-r--r--src/test/ui/unsized-locals/borrow-after-move.stderr23
-rw-r--r--src/test/ui/unsized-locals/by-value-trait-object-safety-rpass.rs2
-rw-r--r--src/test/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs1
-rw-r--r--src/test/ui/unsized-locals/by-value-trait-object-safety.rs6
-rw-r--r--src/test/ui/unsized-locals/by-value-trait-object-safety.stderr17
-rw-r--r--src/test/ui/unsized-locals/double-move.rs1
-rw-r--r--src/test/ui/unsized-locals/double-move.stderr25
-rw-r--r--src/test/ui/unsized-locals/issue-30276-feature-flagged.rs1
-rw-r--r--src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr13
-rw-r--r--src/test/ui/unsized-locals/issue-50940-with-feature.rs1
-rw-r--r--src/test/ui/unsized-locals/issue-50940-with-feature.stderr13
-rw-r--r--src/test/ui/unsized-locals/reference-unsized-locals.rs1
-rw-r--r--src/test/ui/unsized-locals/simple-unsized-locals.rs1
-rw-r--r--src/test/ui/unsized-locals/unsized-exprs-rpass.rs2
-rw-r--r--src/test/ui/unsized-locals/unsized-exprs.rs1
-rw-r--r--src/test/ui/unsized-locals/unsized-exprs.stderr17
-rw-r--r--src/test/ui/unsized-locals/unsized-exprs2.rs1
-rw-r--r--src/test/ui/unsized-locals/unsized-exprs2.stderr13
-rw-r--r--src/test/ui/unsized-locals/unsized-index.rs1
-rw-r--r--src/test/ui/unsized-locals/unsized-parameters.rs1
28 files changed, 155 insertions, 57 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs
index 8a5a1066b06..ad926a810e6 100644
--- a/compiler/rustc_feature/src/active.rs
+++ b/compiler/rustc_feature/src/active.rs
@@ -632,6 +632,7 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
     sym::specialization,
     sym::inline_const,
     sym::repr128,
+    sym::unsized_locals,
 ];
 
 /// Some features are not allowed to be used together at the same time, if
diff --git a/src/test/ui/error-codes/E0161.rs b/src/test/ui/error-codes/E0161.rs
index 58217ff74b8..e0f5776424e 100644
--- a/src/test/ui/error-codes/E0161.rs
+++ b/src/test/ui/error-codes/E0161.rs
@@ -9,13 +9,13 @@
 //[zflagsul]compile-flags: -Z borrowck=migrate
 //[editionul]edition:2018
 
+#![allow(incomplete_features)]
 #![cfg_attr(nll, feature(nll))]
 #![cfg_attr(nllul, feature(nll))]
 #![cfg_attr(migrateul, feature(unsized_locals))]
 #![cfg_attr(zflagsul, feature(unsized_locals))]
 #![cfg_attr(nllul, feature(unsized_locals))]
 #![cfg_attr(editionul, feature(unsized_locals))]
-
 #![feature(box_syntax)]
 
 fn foo(x: Box<[i32]>) {
diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs
index abd2faa7dc6..4ea0a609af4 100644
--- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs
+++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs
@@ -1,4 +1,5 @@
 #![feature(arbitrary_self_types, coerce_unsized, dispatch_from_dyn, unsize, unsized_locals, unsized_fn_params)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 // This tests a few edge-cases around `arbitrary_self_types`. Most specifically,
 // it checks that the `ObjectCandidate` you get from method matching can't
diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
index 08be7ee155e..4a06a95120a 100644
--- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
+++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
@@ -1,5 +1,14 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:1:77
+   |
+LL | #![feature(arbitrary_self_types, coerce_unsized, dispatch_from_dyn, unsize, unsized_locals, unsized_fn_params)]
+   |                                                                             ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error[E0308]: mismatched types
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:85:24
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:86:24
    |
 LL |     let _seetype: () = z;
    |                   --   ^ expected `()`, found `u32`
@@ -7,7 +16,7 @@ LL |     let _seetype: () = z;
    |                   expected due to this
 
 error[E0308]: mismatched types
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:102:24
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:103:24
    |
 LL |     let _seetype: () = z;
    |                   --   ^ expected `()`, found `u64`
@@ -15,23 +24,23 @@ LL |     let _seetype: () = z;
    |                   expected due to this
 
 error[E0034]: multiple applicable items in scope
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:120:15
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:121:15
    |
 LL |     let z = x.foo();
    |               ^^^ multiple `foo` found
    |
 note: candidate #1 is defined in an impl of the trait `X` for the type `T`
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:43:9
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:44:9
    |
 LL |         fn foo(self: Smaht<Self, u64>) -> u64 {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 note: candidate #2 is defined in an impl of the trait `NuisanceFoo` for the type `T`
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:70:9
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:71:9
    |
 LL |         fn foo(self) {}
    |         ^^^^^^^^^^^^
 note: candidate #3 is defined in the trait `FinalFoo`
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:57:5
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:58:5
    |
 LL |     fn foo(&self) -> u8;
    |     ^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +58,7 @@ LL |     let z = FinalFoo::foo(x);
    |             ^^^^^^^^^^^^^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:137:24
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:138:24
    |
 LL |     let _seetype: () = z;
    |                   --   ^ expected `()`, found `u8`
@@ -57,7 +66,7 @@ LL |     let _seetype: () = z;
    |                   expected due to this
 
 error[E0308]: mismatched types
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:155:24
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:156:24
    |
 LL |     let _seetype: () = z;
    |                   --   ^ expected `()`, found `u32`
@@ -65,14 +74,14 @@ LL |     let _seetype: () = z;
    |                   expected due to this
 
 error[E0308]: mismatched types
-  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:172:24
+  --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:173:24
    |
 LL |     let _seetype: () = z;
    |                   --   ^ expected `()`, found `u32`
    |                   |
    |                   expected due to this
 
-error: aborting due to 6 previous errors
+error: aborting due to 6 previous errors; 1 warning emitted
 
 Some errors have detailed explanations: E0034, E0308.
 For more information about an error, try `rustc --explain E0034`.
diff --git a/src/test/ui/moves/move-out-of-slice-2.rs b/src/test/ui/moves/move-out-of-slice-2.rs
index 5c1a61eb375..d91be023ed7 100644
--- a/src/test/ui/moves/move-out-of-slice-2.rs
+++ b/src/test/ui/moves/move-out-of-slice-2.rs
@@ -1,4 +1,5 @@
 #![feature(unsized_locals)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 struct A;
 #[derive(Clone, Copy)]
@@ -8,13 +9,13 @@ fn main() {
     let a: Box<[A]> = Box::new([A]);
     match *a {
         //~^ ERROR cannot move out of type `[A]`, a non-copy slice
-        [a @ ..] => {},
+        [a @ ..] => {}
         _ => {}
     }
     let b: Box<[A]> = Box::new([A, A, A]);
     match *b {
         //~^ ERROR cannot move out of type `[A]`, a non-copy slice
-        [_, _, b @ .., _] => {},
+        [_, _, b @ .., _] => {}
         _ => {}
     }
 
@@ -22,13 +23,13 @@ fn main() {
     let c: Box<[C]> = Box::new([C]);
     match *c {
         //~^ ERROR cannot move out of type `[C]`, a non-copy slice
-        [c @ ..] => {},
+        [c @ ..] => {}
         _ => {}
     }
     let d: Box<[C]> = Box::new([C, C, C]);
     match *d {
         //~^ ERROR cannot move out of type `[C]`, a non-copy slice
-        [_, _, d @ .., _] => {},
+        [_, _, d @ .., _] => {}
         _ => {}
     }
 }
diff --git a/src/test/ui/moves/move-out-of-slice-2.stderr b/src/test/ui/moves/move-out-of-slice-2.stderr
index 058f34b24a3..9a863bf31a7 100644
--- a/src/test/ui/moves/move-out-of-slice-2.stderr
+++ b/src/test/ui/moves/move-out-of-slice-2.stderr
@@ -1,51 +1,60 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/move-out-of-slice-2.rs:1:12
+   |
+LL | #![feature(unsized_locals)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error[E0508]: cannot move out of type `[A]`, a non-copy slice
-  --> $DIR/move-out-of-slice-2.rs:9:11
+  --> $DIR/move-out-of-slice-2.rs:10:11
    |
 LL |     match *a {
    |           ^^ cannot move out of here
 LL |
-LL |         [a @ ..] => {},
+LL |         [a @ ..] => {}
    |          ------
    |          |
    |          data moved here
    |          move occurs because `a` has type `[A]`, which does not implement the `Copy` trait
 
 error[E0508]: cannot move out of type `[A]`, a non-copy slice
-  --> $DIR/move-out-of-slice-2.rs:15:11
+  --> $DIR/move-out-of-slice-2.rs:16:11
    |
 LL |     match *b {
    |           ^^ cannot move out of here
 LL |
-LL |         [_, _, b @ .., _] => {},
+LL |         [_, _, b @ .., _] => {}
    |                ------
    |                |
    |                data moved here
    |                move occurs because `b` has type `[A]`, which does not implement the `Copy` trait
 
 error[E0508]: cannot move out of type `[C]`, a non-copy slice
-  --> $DIR/move-out-of-slice-2.rs:23:11
+  --> $DIR/move-out-of-slice-2.rs:24:11
    |
 LL |     match *c {
    |           ^^ cannot move out of here
 LL |
-LL |         [c @ ..] => {},
+LL |         [c @ ..] => {}
    |          ------
    |          |
    |          data moved here
    |          move occurs because `c` has type `[C]`, which does not implement the `Copy` trait
 
 error[E0508]: cannot move out of type `[C]`, a non-copy slice
-  --> $DIR/move-out-of-slice-2.rs:29:11
+  --> $DIR/move-out-of-slice-2.rs:30:11
    |
 LL |     match *d {
    |           ^^ cannot move out of here
 LL |
-LL |         [_, _, d @ .., _] => {},
+LL |         [_, _, d @ .., _] => {}
    |                ------
    |                |
    |                data moved here
    |                move occurs because `d` has type `[C]`, which does not implement the `Copy` trait
 
-error: aborting due to 4 previous errors
+error: aborting due to 4 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0508`.
diff --git a/src/test/ui/unsized-locals/autoderef.rs b/src/test/ui/unsized-locals/autoderef.rs
index 63d9ce6d3c3..5dd5898c12e 100644
--- a/src/test/ui/unsized-locals/autoderef.rs
+++ b/src/test/ui/unsized-locals/autoderef.rs
@@ -1,5 +1,6 @@
 // run-pass
 
+#![allow(incomplete_features)]
 #![feature(unsized_locals, unsized_fn_params)]
 
 pub trait Foo {
diff --git a/src/test/ui/unsized-locals/borrow-after-move.rs b/src/test/ui/unsized-locals/borrow-after-move.rs
index 4e02ea6a4f4..bf305a318d8 100644
--- a/src/test/ui/unsized-locals/borrow-after-move.rs
+++ b/src/test/ui/unsized-locals/borrow-after-move.rs
@@ -1,4 +1,5 @@
 #![feature(unsized_locals, unsized_fn_params)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 pub trait Foo {
     fn foo(self) -> String;
diff --git a/src/test/ui/unsized-locals/borrow-after-move.stderr b/src/test/ui/unsized-locals/borrow-after-move.stderr
index b49c32f5f80..5934276cc1d 100644
--- a/src/test/ui/unsized-locals/borrow-after-move.stderr
+++ b/src/test/ui/unsized-locals/borrow-after-move.stderr
@@ -1,5 +1,14 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/borrow-after-move.rs:1:12
+   |
+LL | #![feature(unsized_locals, unsized_fn_params)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/borrow-after-move.rs:20:24
+  --> $DIR/borrow-after-move.rs:21:24
    |
 LL |         let y = *x;
    |                 -- value moved here
@@ -10,7 +19,7 @@ LL |         println!("{}", &x);
    = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
 
 error[E0382]: borrow of moved value: `y`
-  --> $DIR/borrow-after-move.rs:22:24
+  --> $DIR/borrow-after-move.rs:23:24
    |
 LL |         let y = *x;
    |             - move occurs because `y` has type `str`, which does not implement the `Copy` trait
@@ -21,7 +30,7 @@ LL |         println!("{}", &y);
    |                        ^^ value borrowed here after move
 
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/borrow-after-move.rs:30:24
+  --> $DIR/borrow-after-move.rs:31:24
    |
 LL |         let y = *x;
    |                 -- value moved here
@@ -32,7 +41,7 @@ LL |         println!("{}", &x);
    = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
 
 error[E0382]: borrow of moved value: `y`
-  --> $DIR/borrow-after-move.rs:32:24
+  --> $DIR/borrow-after-move.rs:33:24
    |
 LL |         let y = *x;
    |             - move occurs because `y` has type `str`, which does not implement the `Copy` trait
@@ -43,13 +52,13 @@ LL |         println!("{}", &y);
    |                        ^^ value borrowed here after move
    |
 note: this function consumes the receiver `self` by taking ownership of it, which moves `y`
-  --> $DIR/borrow-after-move.rs:4:12
+  --> $DIR/borrow-after-move.rs:5:12
    |
 LL |     fn foo(self) -> String;
    |            ^^^^
 
 error[E0382]: borrow of moved value: `x`
-  --> $DIR/borrow-after-move.rs:39:24
+  --> $DIR/borrow-after-move.rs:40:24
    |
 LL |         let x = "hello".to_owned().into_boxed_str();
    |             - move occurs because `x` has type `Box<str>`, which does not implement the `Copy` trait
@@ -58,6 +67,6 @@ LL |         x.foo();
 LL |         println!("{}", &x);
    |                        ^^ value borrowed here after move
 
-error: aborting due to 5 previous errors
+error: aborting due to 5 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/unsized-locals/by-value-trait-object-safety-rpass.rs b/src/test/ui/unsized-locals/by-value-trait-object-safety-rpass.rs
index b07d1a571b2..b9881defac3 100644
--- a/src/test/ui/unsized-locals/by-value-trait-object-safety-rpass.rs
+++ b/src/test/ui/unsized-locals/by-value-trait-object-safety-rpass.rs
@@ -1,5 +1,6 @@
 // run-pass
 
+#![allow(incomplete_features)]
 #![feature(unsized_locals)]
 
 pub trait Foo {
@@ -14,7 +15,6 @@ impl Foo for A {
     }
 }
 
-
 fn main() {
     let x = *(Box::new(A) as Box<dyn Foo>);
     assert_eq!(x.foo(), format!("hello"));
diff --git a/src/test/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs b/src/test/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs
index b05504fbe82..957991f853b 100644
--- a/src/test/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs
+++ b/src/test/ui/unsized-locals/by-value-trait-object-safety-withdefault.rs
@@ -1,5 +1,6 @@
 // run-pass
 
+#![allow(incomplete_features)]
 #![feature(unsized_locals, unsized_fn_params)]
 
 pub trait Foo {
diff --git a/src/test/ui/unsized-locals/by-value-trait-object-safety.rs b/src/test/ui/unsized-locals/by-value-trait-object-safety.rs
index 8b24328bd38..d2985425417 100644
--- a/src/test/ui/unsized-locals/by-value-trait-object-safety.rs
+++ b/src/test/ui/unsized-locals/by-value-trait-object-safety.rs
@@ -1,7 +1,10 @@
 #![feature(unsized_locals)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 pub trait Foo {
-    fn foo(self) -> String where Self: Sized;
+    fn foo(self) -> String
+    where
+        Self: Sized;
 }
 
 struct A;
@@ -12,7 +15,6 @@ impl Foo for A {
     }
 }
 
-
 fn main() {
     let x = *(Box::new(A) as Box<dyn Foo>);
     x.foo();
diff --git a/src/test/ui/unsized-locals/by-value-trait-object-safety.stderr b/src/test/ui/unsized-locals/by-value-trait-object-safety.stderr
index 4cd2098eef2..59d91bc0cfd 100644
--- a/src/test/ui/unsized-locals/by-value-trait-object-safety.stderr
+++ b/src/test/ui/unsized-locals/by-value-trait-object-safety.stderr
@@ -1,11 +1,20 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/by-value-trait-object-safety.rs:1:12
+   |
+LL | #![feature(unsized_locals)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error: the `foo` method cannot be invoked on a trait object
-  --> $DIR/by-value-trait-object-safety.rs:18:7
+  --> $DIR/by-value-trait-object-safety.rs:20:7
    |
-LL |     fn foo(self) -> String where Self: Sized;
-   |                                        ----- this has a `Sized` requirement
+LL |         Self: Sized;
+   |               ----- this has a `Sized` requirement
 ...
 LL |     x.foo();
    |       ^^^
 
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
 
diff --git a/src/test/ui/unsized-locals/double-move.rs b/src/test/ui/unsized-locals/double-move.rs
index 5c430a0c388..35d95232f34 100644
--- a/src/test/ui/unsized-locals/double-move.rs
+++ b/src/test/ui/unsized-locals/double-move.rs
@@ -1,4 +1,5 @@
 #![feature(unsized_locals, unsized_fn_params)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 pub trait Foo {
     fn foo(self) -> String;
diff --git a/src/test/ui/unsized-locals/double-move.stderr b/src/test/ui/unsized-locals/double-move.stderr
index 36fb32ae09c..b897dbbc9a3 100644
--- a/src/test/ui/unsized-locals/double-move.stderr
+++ b/src/test/ui/unsized-locals/double-move.stderr
@@ -1,5 +1,14 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/double-move.rs:1:12
+   |
+LL | #![feature(unsized_locals, unsized_fn_params)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error[E0382]: use of moved value: `y`
-  --> $DIR/double-move.rs:20:22
+  --> $DIR/double-move.rs:21:22
    |
 LL |         let y = *x;
    |             - move occurs because `y` has type `str`, which does not implement the `Copy` trait
@@ -9,7 +18,7 @@ LL |         drop_unsized(y);
    |                      ^ value used here after move
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/double-move.rs:26:22
+  --> $DIR/double-move.rs:27:22
    |
 LL |         let _y = *x;
    |                  -- value moved here
@@ -19,7 +28,7 @@ LL |         drop_unsized(x);
    = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
 
 error[E0382]: use of moved value: `*x`
-  --> $DIR/double-move.rs:32:18
+  --> $DIR/double-move.rs:33:18
    |
 LL |         let x = "hello".to_owned().into_boxed_str();
    |             - move occurs because `x` has type `Box<str>`, which does not implement the `Copy` trait
@@ -29,7 +38,7 @@ LL |         let _y = *x;
    |                  ^^ value used here after move
 
 error[E0382]: use of moved value: `y`
-  --> $DIR/double-move.rs:39:9
+  --> $DIR/double-move.rs:40:9
    |
 LL |         let y = *x;
    |             - move occurs because `y` has type `str`, which does not implement the `Copy` trait
@@ -39,13 +48,13 @@ LL |         y.foo();
    |         ^ value used here after move
    |
 note: this function consumes the receiver `self` by taking ownership of it, which moves `y`
-  --> $DIR/double-move.rs:4:12
+  --> $DIR/double-move.rs:5:12
    |
 LL |     fn foo(self) -> String;
    |            ^^^^
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/double-move.rs:45:9
+  --> $DIR/double-move.rs:46:9
    |
 LL |         let _y = *x;
    |                  -- value moved here
@@ -55,7 +64,7 @@ LL |         x.foo();
    = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait
 
 error[E0382]: use of moved value: `*x`
-  --> $DIR/double-move.rs:51:18
+  --> $DIR/double-move.rs:52:18
    |
 LL |         let x = "hello".to_owned().into_boxed_str();
    |             - move occurs because `x` has type `Box<str>`, which does not implement the `Copy` trait
@@ -64,6 +73,6 @@ LL |         x.foo();
 LL |         let _y = *x;
    |                  ^^ value used here after move
 
-error: aborting due to 6 previous errors
+error: aborting due to 6 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/unsized-locals/issue-30276-feature-flagged.rs b/src/test/ui/unsized-locals/issue-30276-feature-flagged.rs
index 4193210b8bd..3b08225c880 100644
--- a/src/test/ui/unsized-locals/issue-30276-feature-flagged.rs
+++ b/src/test/ui/unsized-locals/issue-30276-feature-flagged.rs
@@ -1,4 +1,5 @@
 #![feature(unsized_locals)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 struct Test([i32]);
 
diff --git a/src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr b/src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr
index be033c0b176..0f0ff579377 100644
--- a/src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr
+++ b/src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr
@@ -1,5 +1,14 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-30276-feature-flagged.rs:1:12
+   |
+LL | #![feature(unsized_locals)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
-  --> $DIR/issue-30276-feature-flagged.rs:6:29
+  --> $DIR/issue-30276-feature-flagged.rs:7:29
    |
 LL |     let _x: fn(_) -> Test = Test;
    |                             ^^^^ doesn't have a size known at compile-time
@@ -8,6 +17,6 @@ LL |     let _x: fn(_) -> Test = Test;
    = note: all function arguments must have a statically known size
    = help: unsized fn params are gated as an unstable feature
 
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/unsized-locals/issue-50940-with-feature.rs b/src/test/ui/unsized-locals/issue-50940-with-feature.rs
index 310dfc9b623..c8b78c4ac55 100644
--- a/src/test/ui/unsized-locals/issue-50940-with-feature.rs
+++ b/src/test/ui/unsized-locals/issue-50940-with-feature.rs
@@ -1,4 +1,5 @@
 #![feature(unsized_locals, unsized_fn_params)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 fn main() {
     struct A<X: ?Sized>(X);
diff --git a/src/test/ui/unsized-locals/issue-50940-with-feature.stderr b/src/test/ui/unsized-locals/issue-50940-with-feature.stderr
index dc20b92b423..1b1a584a01f 100644
--- a/src/test/ui/unsized-locals/issue-50940-with-feature.stderr
+++ b/src/test/ui/unsized-locals/issue-50940-with-feature.stderr
@@ -1,5 +1,14 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-50940-with-feature.rs:1:12
+   |
+LL | #![feature(unsized_locals, unsized_fn_params)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/issue-50940-with-feature.rs:5:5
+  --> $DIR/issue-50940-with-feature.rs:6:5
    |
 LL |     A as fn(str) -> A<str>;
    |     ^ doesn't have a size known at compile-time
@@ -8,6 +17,6 @@ LL |     A as fn(str) -> A<str>;
    = note: required because it appears within the type `A<str>`
    = note: the return type of a function must have a statically known size
 
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/unsized-locals/reference-unsized-locals.rs b/src/test/ui/unsized-locals/reference-unsized-locals.rs
index 1560d25d4b0..4e887f32753 100644
--- a/src/test/ui/unsized-locals/reference-unsized-locals.rs
+++ b/src/test/ui/unsized-locals/reference-unsized-locals.rs
@@ -1,5 +1,6 @@
 // run-pass
 
+#![allow(incomplete_features)]
 #![feature(unsized_locals)]
 
 fn main() {
diff --git a/src/test/ui/unsized-locals/simple-unsized-locals.rs b/src/test/ui/unsized-locals/simple-unsized-locals.rs
index 05955919245..02b7c299aa4 100644
--- a/src/test/ui/unsized-locals/simple-unsized-locals.rs
+++ b/src/test/ui/unsized-locals/simple-unsized-locals.rs
@@ -1,5 +1,6 @@
 // run-pass
 
+#![allow(incomplete_features)]
 #![feature(unsized_locals)]
 
 fn main() {
diff --git a/src/test/ui/unsized-locals/unsized-exprs-rpass.rs b/src/test/ui/unsized-locals/unsized-exprs-rpass.rs
index fc564d16ddb..8fcb6d93d39 100644
--- a/src/test/ui/unsized-locals/unsized-exprs-rpass.rs
+++ b/src/test/ui/unsized-locals/unsized-exprs-rpass.rs
@@ -1,5 +1,5 @@
 // run-pass
-#![allow(unused_braces, unused_parens)]
+#![allow(incomplete_features, unused_braces, unused_parens)]
 #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
 
 struct A<X: ?Sized>(X);
diff --git a/src/test/ui/unsized-locals/unsized-exprs.rs b/src/test/ui/unsized-locals/unsized-exprs.rs
index be3140db86b..348629c0ff3 100644
--- a/src/test/ui/unsized-locals/unsized-exprs.rs
+++ b/src/test/ui/unsized-locals/unsized-exprs.rs
@@ -1,4 +1,5 @@
 #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 struct A<X: ?Sized>(X);
 
diff --git a/src/test/ui/unsized-locals/unsized-exprs.stderr b/src/test/ui/unsized-locals/unsized-exprs.stderr
index 9fb401aec2c..493a5425e5d 100644
--- a/src/test/ui/unsized-locals/unsized-exprs.stderr
+++ b/src/test/ui/unsized-locals/unsized-exprs.stderr
@@ -1,5 +1,14 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/unsized-exprs.rs:1:36
+   |
+LL | #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
+   |                                    ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-  --> $DIR/unsized-exprs.rs:22:26
+  --> $DIR/unsized-exprs.rs:23:26
    |
 LL |     udrop::<(i32, [u8])>((42, *foo()));
    |                          ^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -9,7 +18,7 @@ LL |     udrop::<(i32, [u8])>((42, *foo()));
    = note: tuples must have a statically known size to be initialized
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-  --> $DIR/unsized-exprs.rs:24:22
+  --> $DIR/unsized-exprs.rs:25:22
    |
 LL |     udrop::<A<[u8]>>(A { 0: *foo() });
    |                      ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -19,7 +28,7 @@ LL |     udrop::<A<[u8]>>(A { 0: *foo() });
    = note: structs must have a statically known size to be initialized
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-  --> $DIR/unsized-exprs.rs:26:22
+  --> $DIR/unsized-exprs.rs:27:22
    |
 LL |     udrop::<A<[u8]>>(A(*foo()));
    |                      ^ doesn't have a size known at compile-time
@@ -28,6 +37,6 @@ LL |     udrop::<A<[u8]>>(A(*foo()));
    = note: required because it appears within the type `A<[u8]>`
    = note: the return type of a function must have a statically known size
 
-error: aborting due to 3 previous errors
+error: aborting due to 3 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/unsized-locals/unsized-exprs2.rs b/src/test/ui/unsized-locals/unsized-exprs2.rs
index 495316c276e..1d0f39881b7 100644
--- a/src/test/ui/unsized-locals/unsized-exprs2.rs
+++ b/src/test/ui/unsized-locals/unsized-exprs2.rs
@@ -1,4 +1,5 @@
 #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
+//~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
 
 struct A<X: ?Sized>(X);
 
diff --git a/src/test/ui/unsized-locals/unsized-exprs2.stderr b/src/test/ui/unsized-locals/unsized-exprs2.stderr
index 88269f237af..fac16b8e07e 100644
--- a/src/test/ui/unsized-locals/unsized-exprs2.stderr
+++ b/src/test/ui/unsized-locals/unsized-exprs2.stderr
@@ -1,5 +1,14 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/unsized-exprs2.rs:1:36
+   |
+LL | #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
+   |                                    ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+
 error[E0508]: cannot move out of type `[u8]`, a non-copy slice
-  --> $DIR/unsized-exprs2.rs:22:5
+  --> $DIR/unsized-exprs2.rs:23:5
    |
 LL |     udrop::<[u8]>(foo()[..]);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -7,6 +16,6 @@ LL |     udrop::<[u8]>(foo()[..]);
    |     cannot move out of here
    |     move occurs because value has type `[u8]`, which does not implement the `Copy` trait
 
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0508`.
diff --git a/src/test/ui/unsized-locals/unsized-index.rs b/src/test/ui/unsized-locals/unsized-index.rs
index 470e0e2f12e..c8b502b271d 100644
--- a/src/test/ui/unsized-locals/unsized-index.rs
+++ b/src/test/ui/unsized-locals/unsized-index.rs
@@ -5,6 +5,7 @@
 // Tightening the bound now could be a breaking change. Although no crater
 // regression were observed (https://github.com/rust-lang/rust/pull/59527),
 // let's be conservative and just add a test for this.
+#![allow(incomplete_features)]
 #![feature(unsized_locals, unsized_fn_params)]
 
 use std::ops;
diff --git a/src/test/ui/unsized-locals/unsized-parameters.rs b/src/test/ui/unsized-locals/unsized-parameters.rs
index 6d87f07f43b..15eeeb93033 100644
--- a/src/test/ui/unsized-locals/unsized-parameters.rs
+++ b/src/test/ui/unsized-locals/unsized-parameters.rs
@@ -1,5 +1,6 @@
 // run-pass
 
+#![allow(incomplete_features)]
 #![feature(unsized_locals, unsized_fn_params)]
 
 pub fn f0(_f: dyn FnOnce()) {}