about summary refs log tree commit diff
path: root/tests/ui/unsized-locals/autoderef.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unsized-locals/autoderef.rs')
-rw-r--r--tests/ui/unsized-locals/autoderef.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/ui/unsized-locals/autoderef.rs b/tests/ui/unsized-locals/autoderef.rs
index 31b58ba4002..24f8a4c5d08 100644
--- a/tests/ui/unsized-locals/autoderef.rs
+++ b/tests/ui/unsized-locals/autoderef.rs
@@ -1,7 +1,4 @@
-//@ run-pass
-
-#![allow(incomplete_features)]
-#![feature(unsized_locals, unsized_fn_params)]
+#![feature(unsized_fn_params)]
 
 pub trait Foo {
     fn foo(self) -> String;
@@ -26,7 +23,7 @@ impl Foo for dyn FnMut() -> String {
 }
 
 fn main() {
-    let x = *(Box::new(['h', 'e', 'l', 'l', 'o']) as Box<[char]>);
+    let x = *(Box::new(['h', 'e', 'l', 'l', 'o']) as Box<[char]>); //~ERROR the size for values of type `[char]` cannot be known at compilation time
     assert_eq!(&x.foo() as &str, "hello");
 
     let x = Box::new(['h', 'e', 'l', 'l', 'o']) as Box<[char]>;
@@ -35,13 +32,13 @@ fn main() {
     let x = "hello".to_owned().into_boxed_str();
     assert_eq!(&x.foo() as &str, "hello");
 
-    let x = *("hello".to_owned().into_boxed_str());
+    let x = *("hello".to_owned().into_boxed_str()); //~ERROR the size for values of type `str` cannot be known at compilation time
     assert_eq!(&x.foo() as &str, "hello");
 
     let x = "hello".to_owned().into_boxed_str();
     assert_eq!(&x.foo() as &str, "hello");
 
-    let x = *(Box::new(|| "hello".to_owned()) as Box<dyn FnMut() -> String>);
+    let x = *(Box::new(|| "hello".to_owned()) as Box<dyn FnMut() -> String>); //~ERROR the size for values of type `dyn FnMut() -> String` cannot be known at compilation time
     assert_eq!(&x.foo() as &str, "hello");
 
     let x = Box::new(|| "hello".to_owned()) as Box<dyn FnMut() -> String>;