rust/tests/ui/traits/upcast_soundness_bug.stderr
2024-09-24 23:12:02 +02:00

12 lines
424 B
Plaintext

error[E0606]: casting `*const dyn Trait<u8, u8>` as `*const dyn Trait<u8, u16>` is invalid
--> $DIR/upcast_soundness_bug.rs:59:13
|
LL | let p = p as *const dyn Trait<u8, u16>; // <- this is bad!
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait objects may have different vtables
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0606`.