diff options
Diffstat (limited to 'src/test/ui/unsized-locals/by-value-trait-object-safety.rs')
| -rw-r--r-- | src/test/ui/unsized-locals/by-value-trait-object-safety.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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(); |
