Make the match exhaustive, adding handling for anonymous types and tuple coercions on the way. Also, exit early when type errors are detected, to avoid error cascades and the like.
10 lines
323 B
Text
10 lines
323 B
Text
error[E0606]: casting `*mut impl std::fmt::Debug+?Sized` as `*mut impl std::fmt::Debug+?Sized` is invalid
|
|
--> $DIR/casts-differing-anon.rs:33:13
|
|
|
|
|
33 | b_raw = f_raw as *mut _; //~ ERROR is invalid
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: vtable kinds may not match
|
|
|
|
error: aborting due to previous error
|
|
|