From 3d0856e44da633e3cd6f2df3fc4c59a7073a20f4 Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Wed, 10 Jul 2024 13:40:25 -0400 Subject: [PATCH] Fix CI --- .../impl-trait/unsized_coercion5.next.stderr | 14 ------------ .../impl-trait/unsized_coercion5.old.stderr | 22 +++++-------------- tests/ui/impl-trait/unsized_coercion5.rs | 4 ++-- 3 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 tests/ui/impl-trait/unsized_coercion5.next.stderr diff --git a/tests/ui/impl-trait/unsized_coercion5.next.stderr b/tests/ui/impl-trait/unsized_coercion5.next.stderr deleted file mode 100644 index 5644ac7ab04bc..0000000000000 --- a/tests/ui/impl-trait/unsized_coercion5.next.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/unsized_coercion5.rs:16:32 - | -LL | let y: Box = x as Box; - | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `Send`, found trait `Trait + Send` - | | - | expected due to this - | - = note: expected struct `Box` - found struct `Box` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/impl-trait/unsized_coercion5.old.stderr b/tests/ui/impl-trait/unsized_coercion5.old.stderr index b6437266f27dd..3ff8a35a517bf 100644 --- a/tests/ui/impl-trait/unsized_coercion5.old.stderr +++ b/tests/ui/impl-trait/unsized_coercion5.old.stderr @@ -1,30 +1,19 @@ -error[E0308]: mismatched types - --> $DIR/unsized_coercion5.rs:16:32 - | -LL | let y: Box = x as Box; - | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `Send`, found trait `Trait + Send` - | | - | expected due to this - | - = note: expected struct `Box` - found struct `Box` - error: cannot check whether the hidden type of opaque type satisfies auto traits - --> $DIR/unsized_coercion5.rs:16:32 + --> $DIR/unsized_coercion5.rs:17:32 | LL | let y: Box = x as Box; | ^ | = note: fetching the hidden types of an opaque inside of the defining scope is not supported. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule note: opaque type is declared here - --> $DIR/unsized_coercion5.rs:13:19 + --> $DIR/unsized_coercion5.rs:14:19 | LL | fn hello() -> Box { | ^^^^^^^^^^^^^^^^^^^ = note: required for the cast from `Box` to `Box` error[E0277]: the size for values of type `impl Trait + ?Sized` cannot be known at compilation time - --> $DIR/unsized_coercion5.rs:16:32 + --> $DIR/unsized_coercion5.rs:17:32 | LL | let y: Box = x as Box; | ^ doesn't have a size known at compile-time @@ -32,7 +21,6 @@ LL | let y: Box = x as Box; = help: the trait `Sized` is not implemented for `impl Trait + ?Sized` = note: required for the cast from `Box` to `Box` -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -Some errors have detailed explanations: E0277, E0308. -For more information about an error, try `rustc --explain E0277`. +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/unsized_coercion5.rs b/tests/ui/impl-trait/unsized_coercion5.rs index b007267a0066f..279384ed8bb4b 100644 --- a/tests/ui/impl-trait/unsized_coercion5.rs +++ b/tests/ui/impl-trait/unsized_coercion5.rs @@ -3,6 +3,7 @@ //@ revisions: next old //@[next] compile-flags: -Znext-solver +//@[next] check-pass #![feature(trait_upcasting)] @@ -14,9 +15,8 @@ fn hello() -> Box { if true { let x = hello(); let y: Box = x as Box; - //[old]~^ ERROR: the size for values of type `impl Trait + ?Sized` cannot be know + //[old]~^ ERROR: the size for values of type `impl Trait + ?Sized` cannot be known //[old]~| ERROR: cannot check whether the hidden type of opaque type satisfies auto traits - //~^^^ ERROR: mismatched types } Box::new(1u32) }