Skip to content

Commit 821fe35

Browse files
committed
Sync from rust f6092f224d2b1774b31033f12d0bee626943b02f
2 parents 1988e68 + 2e71518 commit 821fe35

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

src/abi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ pub(crate) fn codegen_drop<'tcx>(
707707
fx.bcx.ins().jump(ret_block, &[]);
708708
} else {
709709
match ty.kind() {
710-
ty::Dynamic(_, _, ty::Dyn) => {
710+
ty::Dynamic(_, _) => {
711711
// IN THIS ARM, WE HAVE:
712712
// ty = *mut (dyn Trait)
713713
// which is: exists<T> ( *mut T, Vtable<T: Trait> )

src/base.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -858,12 +858,6 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt:
858858
fx.bcx.ins().nop();
859859
}
860860
}
861-
Rvalue::Len(place) => {
862-
let place = codegen_place(fx, place);
863-
let usize_layout = fx.layout_of(fx.tcx.types.usize);
864-
let len = codegen_array_len(fx, place);
865-
lval.write_cvalue(fx, CValue::by_val(len, usize_layout));
866-
}
867861
Rvalue::ShallowInitBox(ref operand, content_ty) => {
868862
let content_ty = fx.monomorphize(content_ty);
869863
let box_layout = fx.layout_of(Ty::new_box(fx.tcx, content_ty));

src/unsize.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ pub(crate) fn unsized_info<'tcx>(
3030
fx.pointer_type,
3131
len.try_to_target_usize(fx.tcx).expect("expected monomorphic const in codegen") as i64,
3232
),
33-
(&ty::Dynamic(data_a, _, src_dyn_kind), &ty::Dynamic(data_b, _, target_dyn_kind))
34-
if src_dyn_kind == target_dyn_kind =>
35-
{
33+
(&ty::Dynamic(data_a, _), &ty::Dynamic(data_b, _)) => {
3634
let old_info =
3735
old_info.expect("unsized_info: missing old info for trait upcasting coercion");
3836
let b_principal_def_id = data_b.principal_def_id();

src/value_and_place.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,7 @@ pub(crate) fn assert_assignable<'tcx>(
902902
);
903903
// fn(&T) -> for<'l> fn(&'l T) is allowed
904904
}
905-
(&ty::Dynamic(from_traits, _, _from_kind), &ty::Dynamic(to_traits, _, _to_kind)) => {
906-
// FIXME(dyn-star): Do the right thing with DynKinds
905+
(&ty::Dynamic(from_traits, _), &ty::Dynamic(to_traits, _)) => {
907906
for (from, to) in from_traits.iter().zip(to_traits) {
908907
let from = fx.tcx.normalize_erasing_late_bound_regions(fx.typing_env(), from);
909908
let to = fx.tcx.normalize_erasing_late_bound_regions(fx.typing_env(), to);

0 commit comments

Comments
 (0)