File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -31,21 +31,10 @@ pub(crate) fn unsized_info<'tcx>(
31
31
if data_a. principal_def_id ( ) == data_b. principal_def_id ( ) {
32
32
return old_info;
33
33
}
34
- // trait upcasting coercion
35
34
36
- // if both of the two `principal`s are `None`, this function would have returned early above.
37
- // and if one of the two `principal`s is `None`, typechecking would have rejected this case.
38
- let principal_a = data_a
39
- . principal ( )
40
- . expect ( "unsized_info: missing principal trait for trait upcasting coercion" ) ;
41
- let principal_b = data_b
42
- . principal ( )
43
- . expect ( "unsized_info: missing principal trait for trait upcasting coercion" ) ;
44
-
45
- let vptr_entry_idx = fx. tcx . vtable_trait_upcasting_coercion_new_vptr_slot ( (
46
- principal_a. with_self_ty ( fx. tcx , source) ,
47
- principal_b. with_self_ty ( fx. tcx , source) ,
48
- ) ) ;
35
+ // trait upcasting coercion
36
+ let vptr_entry_idx =
37
+ fx. tcx . vtable_trait_upcasting_coercion_new_vptr_slot ( ( source, target) ) ;
49
38
50
39
if let Some ( entry_idx) = vptr_entry_idx {
51
40
let entry_idx = u32:: try_from ( entry_idx) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments