Skip to content

Commit 8520535

Browse files
committed
make NOP dyn casts not require anything about the vtable
1 parent 451817e commit 8520535

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: src/unsize.rs

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub(crate) fn unsized_info<'tcx>(
2929
let old_info =
3030
old_info.expect("unsized_info: missing old info for trait upcasting coercion");
3131
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.
3233
return old_info;
3334
}
3435

0 commit comments

Comments
 (0)