rust/tests/ui/traits/upcast_soundness_bug.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
424 B
Plaintext
Raw Normal View History

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