Skip to content

Commit a4acd22

Browse files
committed
move fn is_item_raw to TypingEnv
1 parent 43181b4 commit a4acd22

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/base.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
1111
use rustc_middle::mir::InlineAsmMacro;
1212
use rustc_middle::ty::TypeVisitableExt;
1313
use rustc_middle::ty::adjustment::PointerCoercion;
14-
use rustc_middle::ty::layout::FnAbiOf;
14+
use rustc_middle::ty::layout::{FnAbiOf, HasTypingEnv};
1515
use rustc_middle::ty::print::with_no_trimmed_paths;
1616

1717
use crate::constant::ConstantCx;
@@ -841,7 +841,7 @@ fn codegen_stmt<'tcx>(
841841
lval.write_cvalue(fx, CValue::by_val(operand, box_layout));
842842
}
843843
Rvalue::NullaryOp(ref null_op, ty) => {
844-
assert!(lval.layout().ty.is_sized(fx.tcx, ty::ParamEnv::reveal_all()));
844+
assert!(lval.layout().ty.is_sized(fx.tcx, fx.typing_env()));
845845
let layout = fx.layout_of(fx.monomorphize(ty));
846846
let val = match null_op {
847847
NullOp::SizeOf => layout.size.bytes(),

src/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn clif_pair_type_from_ty<'tcx>(
103103

104104
/// Is a pointer to this type a wide ptr?
105105
pub(crate) fn has_ptr_meta<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
106-
if ty.is_sized(tcx, ty::ParamEnv::reveal_all()) {
106+
if ty.is_sized(tcx, ty::TypingEnv::fully_monomorphized()) {
107107
return false;
108108
}
109109

0 commit comments

Comments
 (0)