rust/src/test/ui/dst/dst-bad-coerce1.stderr

39 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/dst-bad-coerce1.rs:16:29
2018-08-08 07:28:26 -05:00
|
LL | let f3: &Fat<[usize]> = f2;
| ^^ expected slice `[usize]`, found array `[isize; 3]`
2018-08-08 07:28:26 -05:00
|
= note: expected reference `&Fat<[usize]>`
found reference `&Fat<[isize; 3]>`
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `Foo: Bar` is not satisfied
2019-05-28 13:46:13 -05:00
--> $DIR/dst-bad-coerce1.rs:22:29
2018-08-08 07:28:26 -05:00
|
2019-05-28 13:46:13 -05:00
LL | let f3: &Fat<dyn Bar> = f2;
| ^^ the trait `Bar` is not implemented for `Foo`
2018-08-08 07:28:26 -05:00
|
= note: required for the cast to the object type `dyn Bar`
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/dst-bad-coerce1.rs:28:27
2018-08-08 07:28:26 -05:00
|
LL | let f3: &([usize],) = f2;
| ^^ expected slice `[usize]`, found array `[isize; 3]`
2018-08-08 07:28:26 -05:00
|
= note: expected reference `&([usize],)`
found reference `&([isize; 3],)`
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `Foo: Bar` is not satisfied
2019-05-28 13:46:13 -05:00
--> $DIR/dst-bad-coerce1.rs:34:27
2018-08-08 07:28:26 -05:00
|
2019-05-28 13:46:13 -05:00
LL | let f3: &(dyn Bar,) = f2;
| ^^ the trait `Bar` is not implemented for `Foo`
2018-08-08 07:28:26 -05:00
|
= note: required for the cast to the object type `dyn Bar`
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0277, E0308.
2018-08-08 07:28:26 -05:00
For more information about an error, try `rustc --explain E0277`.