We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1cde1a3 + 8520535 commit ee65a10Copy full SHA for ee65a10
src/unsize.rs
@@ -29,6 +29,7 @@ pub(crate) fn unsized_info<'tcx>(
29
let old_info =
30
old_info.expect("unsized_info: missing old info for trait upcasting coercion");
31
if data_a.principal_def_id() == data_b.principal_def_id() {
32
+ // A NOP cast that doesn't actually change anything, should be allowed even with invalid vtables.
33
return old_info;
34
}
35
0 commit comments