mirror of https://github.com/rust-lang/rust
14 lines
628 B
Plaintext
14 lines
628 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/upcast_soundness_bug.rs:59:13
|
|
|
|
|
LL | let p = p as *const dyn Trait<u8, u16>; // <- this is bad!
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `u16`
|
|
|
|
|
= note: expected trait object `dyn Trait<u8, u8>`
|
|
found trait object `dyn Trait<u8, u16>`
|
|
= help: `dyn Trait<u8, u16>` implements `Trait` so you could box the found value and coerce it to the trait object `Box<dyn Trait>`, you will have to change the expected type as well
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|