39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
|
error[E0308]: mismatched types
|
||
|
--> $DIR/dst-bad-coerce1.rs:26:29
|
||
|
|
|
||
|
LL | let f3: &Fat<[usize]> = f2;
|
||
|
| ^^ expected slice, found array of 3 elements
|
||
|
|
|
||
|
= note: expected type `&Fat<[usize]>`
|
||
|
found type `&Fat<[isize; 3]>`
|
||
|
|
||
|
error[E0277]: the trait bound `Foo: Bar` is not satisfied
|
||
|
--> $DIR/dst-bad-coerce1.rs:32:25
|
||
|
|
|
||
|
LL | let f3: &Fat<Bar> = f2;
|
||
|
| ^^ the trait `Bar` is not implemented for `Foo`
|
||
|
|
|
||
|
= note: required for the cast to the object type `dyn Bar`
|
||
|
|
||
|
error[E0308]: mismatched types
|
||
|
--> $DIR/dst-bad-coerce1.rs:38:27
|
||
|
|
|
||
|
LL | let f3: &([usize],) = f2;
|
||
|
| ^^ expected slice, found array of 3 elements
|
||
|
|
|
||
|
= note: expected type `&([usize],)`
|
||
|
found type `&([isize; 3],)`
|
||
|
|
||
|
error[E0277]: the trait bound `Foo: Bar` is not satisfied
|
||
|
--> $DIR/dst-bad-coerce1.rs:44:23
|
||
|
|
|
||
|
LL | let f3: &(Bar,) = f2;
|
||
|
| ^^ the trait `Bar` is not implemented for `Foo`
|
||
|
|
|
||
|
= note: required for the cast to the object type `dyn Bar`
|
||
|
|
||
|
error: aborting due to 4 previous errors
|
||
|
|
||
|
Some errors occurred: E0277, E0308.
|
||
|
For more information about an error, try `rustc --explain E0277`.
|