Update tooling
This commit is contained in:
parent
5e1872598c
commit
33a92bc8b0
@ -770,11 +770,7 @@ fn is_fat_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool {
|
|||||||
lval.write_cvalue(fx, CValue::by_val(operand, box_layout));
|
lval.write_cvalue(fx, CValue::by_val(operand, box_layout));
|
||||||
}
|
}
|
||||||
Rvalue::NullaryOp(null_op, ty) => {
|
Rvalue::NullaryOp(null_op, ty) => {
|
||||||
assert!(
|
assert!(lval.layout().ty.is_sized(fx.tcx, ParamEnv::reveal_all()));
|
||||||
lval.layout()
|
|
||||||
.ty
|
|
||||||
.is_sized(fx.tcx.at(stmt.source_info.span), ParamEnv::reveal_all())
|
|
||||||
);
|
|
||||||
let layout = fx.layout_of(fx.monomorphize(ty));
|
let layout = fx.layout_of(fx.monomorphize(ty));
|
||||||
let val = match null_op {
|
let val = match null_op {
|
||||||
NullOp::SizeOf => layout.size.bytes(),
|
NullOp::SizeOf => layout.size.bytes(),
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
use rustc_middle::mir::interpret::{
|
use rustc_middle::mir::interpret::{
|
||||||
read_target_uint, AllocId, ConstAllocation, ConstValue, ErrorHandled, GlobalAlloc, Scalar,
|
read_target_uint, AllocId, ConstAllocation, ConstValue, ErrorHandled, GlobalAlloc, Scalar,
|
||||||
};
|
};
|
||||||
use rustc_span::DUMMY_SP;
|
|
||||||
|
|
||||||
use cranelift_module::*;
|
use cranelift_module::*;
|
||||||
|
|
||||||
@ -291,7 +290,7 @@ fn data_id_for_static(
|
|||||||
let is_mutable = if tcx.is_mutable_static(def_id) {
|
let is_mutable = if tcx.is_mutable_static(def_id) {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
!ty.is_freeze(tcx.at(DUMMY_SP), ParamEnv::reveal_all())
|
!ty.is_freeze(tcx, ParamEnv::reveal_all())
|
||||||
};
|
};
|
||||||
let align = tcx.layout_of(ParamEnv::reveal_all().and(ty)).unwrap().align.pref.bytes();
|
let align = tcx.layout_of(ParamEnv::reveal_all().and(ty)).unwrap().align.pref.bytes();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user