Skip to content

Commit 0134916

Browse files
committed
Sync from rust 4507fdaaa27ea2fb59a41df2ce7d1f290da53dae
2 parents cb12ad7 + 8fe8e53 commit 0134916

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/codegen_i128.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub(crate) fn maybe_codegen<'tcx>(
4141
fx.layout_of(if is_signed { fx.tcx.types.i128 } else { fx.tcx.types.u128 }),
4242
))
4343
} else {
44-
let out_ty = fx.tcx.mk_tup([lhs.layout().ty, fx.tcx.types.bool].iter());
44+
let out_ty = fx.tcx.intern_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
4545
let oflow = CPlace::new_stack_slot(fx, fx.layout_of(fx.tcx.types.i32));
4646
let lhs = lhs.load_scalar(fx);
4747
let rhs = rhs.load_scalar(fx);
@@ -63,7 +63,7 @@ pub(crate) fn maybe_codegen<'tcx>(
6363
}
6464
BinOp::Add | BinOp::Sub | BinOp::Mul => {
6565
assert!(checked);
66-
let out_ty = fx.tcx.mk_tup([lhs.layout().ty, fx.tcx.types.bool].iter());
66+
let out_ty = fx.tcx.intern_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
6767
let out_place = CPlace::new_stack_slot(fx, fx.layout_of(out_ty));
6868
let param_types = vec![
6969
AbiParam::special(fx.pointer_type, ArgumentPurpose::StructReturn),

src/intrinsics/llvm_x86.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ fn llvm_add_sub<'tcx>(
191191
// carry0 | carry1 -> carry or borrow respectively
192192
let cb_out = fx.bcx.ins().bor(cb0, cb1);
193193

194-
let layout = fx.layout_of(fx.tcx.mk_tup([fx.tcx.types.u8, fx.tcx.types.u64].iter()));
194+
let layout = fx.layout_of(fx.tcx.intern_tup(&[fx.tcx.types.u8, fx.tcx.types.u64]));
195195
let val = CValue::by_val_pair(cb_out, c, layout);
196196
ret.write_cvalue(fx, val);
197197
}

src/main_shim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub(crate) fn maybe_create_entry_wrapper(
119119
tcx,
120120
ParamEnv::reveal_all(),
121121
report.def_id,
122-
tcx.mk_substs([GenericArg::from(main_ret_ty)].iter()),
122+
tcx.intern_substs(&[GenericArg::from(main_ret_ty)]),
123123
)
124124
.unwrap()
125125
.unwrap()

src/num.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pub(crate) fn codegen_checked_int_binop<'tcx>(
289289
_ => bug!("binop {:?} on checked int/uint lhs: {:?} rhs: {:?}", bin_op, in_lhs, in_rhs),
290290
};
291291

292-
let out_layout = fx.layout_of(fx.tcx.mk_tup([in_lhs.layout().ty, fx.tcx.types.bool].iter()));
292+
let out_layout = fx.layout_of(fx.tcx.intern_tup(&[in_lhs.layout().ty, fx.tcx.types.bool]));
293293
CValue::by_val_pair(res, has_overflow, out_layout)
294294
}
295295

0 commit comments

Comments
 (0)