|
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 |
| - |
12 | 1 | 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 |
14 | 3 | |
|
15 | 4 | LL | let y: Box<dyn Send> = x as Box<dyn Trait + Send>;
|
16 | 5 | | ^
|
17 | 6 | |
|
18 | 7 | = 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
|
19 | 8 | note: opaque type is declared here
|
20 |
| - --> $DIR/unsized_coercion5.rs:13:19 |
| 9 | + --> $DIR/unsized_coercion5.rs:14:19 |
21 | 10 | |
|
22 | 11 | LL | fn hello() -> Box<impl Trait + ?Sized> {
|
23 | 12 | | ^^^^^^^^^^^^^^^^^^^
|
24 | 13 | = note: required for the cast from `Box<impl Trait + ?Sized>` to `Box<dyn Trait + Send>`
|
25 | 14 |
|
26 | 15 | 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 |
28 | 17 | |
|
29 | 18 | LL | let y: Box<dyn Send> = x as Box<dyn Trait + Send>;
|
30 | 19 | | ^ doesn't have a size known at compile-time
|
31 | 20 | |
|
32 | 21 | = help: the trait `Sized` is not implemented for `impl Trait + ?Sized`
|
33 | 22 | = note: required for the cast from `Box<impl Trait + ?Sized>` to `Box<dyn Trait + Send>`
|
34 | 23 |
|
35 |
| -error: aborting due to 3 previous errors |
| 24 | +error: aborting due to 2 previous errors |
36 | 25 |
|
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`. |
0 commit comments