Skip to content

Commit 3d0856e

Browse files
Fix CI
1 parent dce9679 commit 3d0856e

File tree

3 files changed

+7
-33
lines changed

3 files changed

+7
-33
lines changed

tests/ui/impl-trait/unsized_coercion5.next.stderr

-14
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,26 @@
1-
error[E0308]: mismatched types
2-
--> $DIR/unsized_coercion5.rs:16:32
3-
|
4-
LL | let y: Box<dyn Send> = x as Box<dyn Trait + Send>;
5-
| ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `Send`, found trait `Trait + Send`
6-
| |
7-
| expected due to this
8-
|
9-
= note: expected struct `Box<dyn Send>`
10-
found struct `Box<dyn Trait + Send>`
11-
121
error: cannot check whether the hidden type of opaque type satisfies auto traits
13-
--> $DIR/unsized_coercion5.rs:16:32
2+
--> $DIR/unsized_coercion5.rs:17:32
143
|
154
LL | let y: Box<dyn Send> = x as Box<dyn Trait + Send>;
165
| ^
176
|
187
= 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
198
note: opaque type is declared here
20-
--> $DIR/unsized_coercion5.rs:13:19
9+
--> $DIR/unsized_coercion5.rs:14:19
2110
|
2211
LL | fn hello() -> Box<impl Trait + ?Sized> {
2312
| ^^^^^^^^^^^^^^^^^^^
2413
= note: required for the cast from `Box<impl Trait + ?Sized>` to `Box<dyn Trait + Send>`
2514

2615
error[E0277]: the size for values of type `impl Trait + ?Sized` cannot be known at compilation time
27-
--> $DIR/unsized_coercion5.rs:16:32
16+
--> $DIR/unsized_coercion5.rs:17:32
2817
|
2918
LL | let y: Box<dyn Send> = x as Box<dyn Trait + Send>;
3019
| ^ doesn't have a size known at compile-time
3120
|
3221
= help: the trait `Sized` is not implemented for `impl Trait + ?Sized`
3322
= note: required for the cast from `Box<impl Trait + ?Sized>` to `Box<dyn Trait + Send>`
3423

35-
error: aborting due to 3 previous errors
24+
error: aborting due to 2 previous errors
3625

37-
Some errors have detailed explanations: E0277, E0308.
38-
For more information about an error, try `rustc --explain E0277`.
26+
For more information about this error, try `rustc --explain E0277`.

tests/ui/impl-trait/unsized_coercion5.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
//@ revisions: next old
55
//@[next] compile-flags: -Znext-solver
6+
//@[next] check-pass
67

78
#![feature(trait_upcasting)]
89

@@ -14,9 +15,8 @@ fn hello() -> Box<impl Trait + ?Sized> {
1415
if true {
1516
let x = hello();
1617
let y: Box<dyn Send> = x as Box<dyn Trait + Send>;
17-
//[old]~^ ERROR: the size for values of type `impl Trait + ?Sized` cannot be know
18+
//[old]~^ ERROR: the size for values of type `impl Trait + ?Sized` cannot be known
1819
//[old]~| ERROR: cannot check whether the hidden type of opaque type satisfies auto traits
19-
//~^^^ ERROR: mismatched types
2020
}
2121
Box::new(1u32)
2222
}

0 commit comments

Comments
 (0)