Skip to content

Commit 33a92bc

Browse files
committed
Update tooling
1 parent 5e18725 commit 33a92bc

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/base.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -770,11 +770,7 @@ fn codegen_stmt<'tcx>(
770770
lval.write_cvalue(fx, CValue::by_val(operand, box_layout));
771771
}
772772
Rvalue::NullaryOp(null_op, ty) => {
773-
assert!(
774-
lval.layout()
775-
.ty
776-
.is_sized(fx.tcx.at(stmt.source_info.span), ParamEnv::reveal_all())
777-
);
773+
assert!(lval.layout().ty.is_sized(fx.tcx, ParamEnv::reveal_all()));
778774
let layout = fx.layout_of(fx.monomorphize(ty));
779775
let val = match null_op {
780776
NullOp::SizeOf => layout.size.bytes(),

src/constant.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
55
use rustc_middle::mir::interpret::{
66
read_target_uint, AllocId, ConstAllocation, ConstValue, ErrorHandled, GlobalAlloc, Scalar,
77
};
8-
use rustc_span::DUMMY_SP;
98

109
use cranelift_module::*;
1110

@@ -291,7 +290,7 @@ fn data_id_for_static(
291290
let is_mutable = if tcx.is_mutable_static(def_id) {
292291
true
293292
} else {
294-
!ty.is_freeze(tcx.at(DUMMY_SP), ParamEnv::reveal_all())
293+
!ty.is_freeze(tcx, ParamEnv::reveal_all())
295294
};
296295
let align = tcx.layout_of(ParamEnv::reveal_all().and(ty)).unwrap().align.pref.bytes();
297296

0 commit comments

Comments
 (0)