diff options
| author | bors <bors@rust-lang.org> | 2022-10-30 08:52:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-30 08:52:35 +0000 |
| commit | 962bf63dbfcb190bd752e2dbff7d133ab1101f5c (patch) | |
| tree | 0d0567de3defda59316b51e53e7687b36025df6f /compiler/rustc_codegen_cranelift | |
| parent | c162fd36d250f1a76e00ffa55b9d827d0db7e0bc (diff) | |
| parent | 0b49a5d17354c3b0980c3148f8291e429fc9a194 (diff) | |
| download | rust-962bf63dbfcb190bd752e2dbff7d133ab1101f5c.tar.gz rust-962bf63dbfcb190bd752e2dbff7d133ab1101f5c.zip | |
Auto merge of #2639 - RalfJung:rustup, r=RalfJung
Rustup
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/constant.rs | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index a41b561598f..1db44502742 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -770,11 +770,7 @@ fn codegen_stmt<'tcx>( lval.write_cvalue(fx, CValue::by_val(operand, box_layout)); } Rvalue::NullaryOp(null_op, ty) => { - assert!( - lval.layout() - .ty - .is_sized(fx.tcx.at(stmt.source_info.span), ParamEnv::reveal_all()) - ); + assert!(lval.layout().ty.is_sized(fx.tcx, ParamEnv::reveal_all())); let layout = fx.layout_of(fx.monomorphize(ty)); let val = match null_op { NullOp::SizeOf => layout.size.bytes(), diff --git a/compiler/rustc_codegen_cranelift/src/constant.rs b/compiler/rustc_codegen_cranelift/src/constant.rs index d4bc3543b2d..148b66d959e 100644 --- a/compiler/rustc_codegen_cranelift/src/constant.rs +++ b/compiler/rustc_codegen_cranelift/src/constant.rs @@ -5,7 +5,6 @@ use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags; use rustc_middle::mir::interpret::{ read_target_uint, AllocId, ConstAllocation, ConstValue, ErrorHandled, GlobalAlloc, Scalar, }; -use rustc_span::DUMMY_SP; use cranelift_module::*; @@ -291,7 +290,7 @@ fn data_id_for_static( let is_mutable = if tcx.is_mutable_static(def_id) { true } 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(); |
