mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
error[E0606]: casting `*const dyn A` as `*const dyn B` is invalid
|
|
--> $DIR/ptr-to-trait-obj-different-args.rs:18:27
|
|
|
|
|
LL | let b: *const dyn B = a as _;
|
|
| ^^^^^^
|
|
|
|
|
= note: the trait objects may have different vtables
|
|
|
|
error[E0606]: casting `*const dyn Trait<X>` as `*const dyn Trait<Y>` is invalid
|
|
--> $DIR/ptr-to-trait-obj-different-args.rs:21:34
|
|
|
|
|
LL | let y: *const dyn Trait<Y> = x as _;
|
|
| ^^^^^^
|
|
|
|
|
= note: the trait objects may have different vtables
|
|
|
|
error[E0606]: casting `*const (dyn Trait<X> + 'static)` as `*const dyn Trait<T>` is invalid
|
|
--> $DIR/ptr-to-trait-obj-different-args.rs:27:34
|
|
|
|
|
LL | let _: *const dyn Trait<T> = x as _;
|
|
| ^^^^^^
|
|
|
|
|
= note: the trait objects may have different vtables
|
|
|
|
error[E0606]: casting `*const (dyn Trait<T> + 'static)` as `*const dyn Trait<X>` is invalid
|
|
--> $DIR/ptr-to-trait-obj-different-args.rs:28:34
|
|
|
|
|
LL | let _: *const dyn Trait<X> = t as _;
|
|
| ^^^^^^
|
|
|
|
|
= note: the trait objects may have different vtables
|
|
|
|
error[E0606]: casting `*mut (dyn Assocked<Assoc = u8> + 'static)` as `*mut (dyn Assocked<Assoc = u32> + 'static)` is invalid
|
|
--> $DIR/ptr-to-trait-obj-different-args.rs:36:5
|
|
|
|
|
LL | x as _
|
|
| ^^^^^^
|
|
|
|
|
= note: the trait objects may have different vtables
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0606`.
|