diff options
Diffstat (limited to 'tests/ui/traits/new-solver/unsize-good.rs')
-rw-r--r-- | tests/ui/traits/new-solver/unsize-good.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/ui/traits/new-solver/unsize-good.rs b/tests/ui/traits/new-solver/unsize-good.rs deleted file mode 100644 index 87ed9cfd1..000000000 --- a/tests/ui/traits/new-solver/unsize-good.rs +++ /dev/null @@ -1,25 +0,0 @@ -// compile-flags: -Ztrait-solver=next -// check-pass - -#![feature(unsized_tuple_coercion)] - -trait Foo {} - -impl Foo for i32 {} - -fn main() { - // Unsizing via struct - let _: Box<dyn Foo> = Box::new(1i32); - - // Slice unsizing - let y = [1, 2, 3]; - let _: &[i32] = &y; - - // Tuple unsizing - let hi = (1i32,); - let _: &(dyn Foo,) = &hi; - - // Dropping auto traits - let a: &(dyn Foo + Send) = &1; - let _: &dyn Foo = a; -} |