about summary refs log tree commit diff
path: root/tests/ui/traits/upcast_soundness_bug.stderr
blob: f5fa6bdc9995bebd2fc4c17739e1e689f0cc34a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
error[E0606]: casting `*const dyn Trait<u8, u8>` as `*const dyn Trait<u8, u16>` is invalid
  --> $DIR/upcast_soundness_bug.rs:58: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`.