make NOP dyn casts not require anything about the vtable
This commit is contained in:
parent
451817e48f
commit
8520535694
1 changed files with 1 additions and 0 deletions
|
@ -29,6 +29,7 @@ pub(crate) fn unsized_info<'tcx>(
|
||||||
let old_info =
|
let old_info =
|
||||||
old_info.expect("unsized_info: missing old info for trait upcasting coercion");
|
old_info.expect("unsized_info: missing old info for trait upcasting coercion");
|
||||||
if data_a.principal_def_id() == data_b.principal_def_id() {
|
if data_a.principal_def_id() == data_b.principal_def_id() {
|
||||||
|
// A NOP cast that doesn't actually change anything, should be allowed even with invalid vtables.
|
||||||
return old_info;
|
return old_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue