mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
62ba3e70a1
The previous output was unintuitive to users.
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/dst-bad-coerce1.rs:16:29
|
|
|
|
|
LL | let f3: &Fat<[usize]> = f2;
|
|
| ------------- ^^ expected `&Fat<[usize]>`, found `&Fat<[isize; 3]>`
|
|
| |
|
|
| expected due to this
|
|
|
|
|
= note: expected reference `&Fat<[usize]>`
|
|
found reference `&Fat<[isize; 3]>`
|
|
|
|
error[E0277]: the trait bound `Foo: Bar` is not satisfied
|
|
--> $DIR/dst-bad-coerce1.rs:22:29
|
|
|
|
|
LL | let f3: &Fat<dyn Bar> = f2;
|
|
| ^^ the trait `Bar` is not implemented for `Foo`
|
|
|
|
|
= note: required for the cast from `Foo` to the object type `dyn Bar`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/dst-bad-coerce1.rs:28:27
|
|
|
|
|
LL | let f3: &([usize],) = f2;
|
|
| ----------- ^^ expected `&([usize],)`, found `&([isize; 3],)`
|
|
| |
|
|
| expected due to this
|
|
|
|
|
= note: expected reference `&([usize],)`
|
|
found reference `&([isize; 3],)`
|
|
|
|
error[E0277]: the trait bound `Foo: Bar` is not satisfied
|
|
--> $DIR/dst-bad-coerce1.rs:34:27
|
|
|
|
|
LL | let f3: &(dyn Bar,) = f2;
|
|
| ^^ the trait `Bar` is not implemented for `Foo`
|
|
|
|
|
= note: required for the cast from `Foo` to the object type `dyn Bar`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
Some errors have detailed explanations: E0277, E0308.
|
|
For more information about an error, try `rustc --explain E0277`.
|