Skip to content

Commit abf2358

Browse files
committed
oh lord
1 parent 5eda8ed commit abf2358

File tree

66 files changed

+651
-600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+651
-600
lines changed

compiler/rustc_codegen_cranelift/src/abi/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
376376
let instance = if let ty::FnDef(def_id, fn_args) = *func.layout().ty.kind() {
377377
let instance = ty::Instance::expect_resolve(
378378
fx.tcx,
379-
ty::TypingMode::PostAnalysis,
380-
ty::ParamEnv::reveal_all(),
379+
ty::TypingEnv::fully_monomorphized(),
381380
def_id,
382381
fn_args,
383382
source_info.span,

compiler/rustc_codegen_cranelift/src/unsize.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ pub(crate) fn unsized_info<'tcx>(
2222
target: Ty<'tcx>,
2323
old_info: Option<Value>,
2424
) -> Value {
25-
let (source, target) =
26-
fx.tcx.struct_lockstep_tails_for_codegen(source, target, ParamEnv::reveal_all());
25+
let (source, target) = fx.tcx.struct_lockstep_tails_for_codegen(
26+
source,
27+
target,
28+
ty::TypingEnv::fully_monomorphized(),
29+
);
2730
match (&source.kind(), &target.kind()) {
2831
(&ty::Array(_, len), &ty::Slice(_)) => fx.bcx.ins().iconst(
2932
fx.pointer_type,

compiler/rustc_codegen_gcc/src/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use rustc_data_structures::fx::FxHashSet;
2424
use rustc_middle::bug;
2525
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
2626
use rustc_middle::ty::layout::{
27-
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError, LayoutOfHelpers,
27+
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasTyCtxt, HasTypingEnv, LayoutError, LayoutOfHelpers,
2828
};
2929
use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt};
3030
use rustc_span::Span;
@@ -2319,7 +2319,7 @@ impl<'a, 'gcc, 'tcx> StaticBuilderMethods for Builder<'a, 'gcc, 'tcx> {
23192319
}
23202320
}
23212321

2322-
impl<'tcx> HasParamEnv<'tcx> for Builder<'_, '_, 'tcx> {
2322+
impl<'tcx> HasTypingEnv<'tcx> for Builder<'_, '_, 'tcx> {
23232323
fn param_env(&self) -> ParamEnv<'tcx> {
23242324
self.cx.param_env()
23252325
}

compiler/rustc_codegen_gcc/src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1111
use rustc_middle::mir::mono::CodegenUnit;
1212
use rustc_middle::span_bug;
1313
use rustc_middle::ty::layout::{
14-
FnAbiError, FnAbiOf, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError,
14+
FnAbiError, FnAbiOf, FnAbiOfHelpers, FnAbiRequest, HasTyCtxt, HasTypingEnv, LayoutError,
1515
LayoutOfHelpers,
1616
};
1717
use rustc_middle::ty::{self, Instance, ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt};
@@ -584,7 +584,7 @@ impl<'gcc, 'tcx> FnAbiOfHelpers<'tcx> for CodegenCx<'gcc, 'tcx> {
584584
}
585585
}
586586

587-
impl<'tcx, 'gcc> HasParamEnv<'tcx> for CodegenCx<'gcc, 'tcx> {
587+
impl<'tcx, 'gcc> HasTypingEnv<'tcx> for CodegenCx<'gcc, 'tcx> {
588588
fn param_env(&self) -> ParamEnv<'tcx> {
589589
ParamEnv::reveal_all()
590590
}

compiler/rustc_codegen_llvm/src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc_data_structures::small_c_str::SmallCStr;
1414
use rustc_hir::def_id::DefId;
1515
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
1616
use rustc_middle::ty::layout::{
17-
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, LayoutError, LayoutOfHelpers,
17+
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasTypingEnv, LayoutError, LayoutOfHelpers,
1818
TyAndLayout,
1919
};
2020
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_hir::def_id::DefId;
1313
use rustc_middle::middle::codegen_fn_attrs::PatchableFunctionEntry;
1414
use rustc_middle::mir::mono::CodegenUnit;
1515
use rustc_middle::ty::layout::{
16-
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, LayoutError, LayoutOfHelpers,
16+
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasTypingEnv, LayoutError, LayoutOfHelpers,
1717
};
1818
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
1919
use rustc_middle::{bug, span_bug};
@@ -1147,7 +1147,7 @@ impl<'tcx> ty::layout::HasTyCtxt<'tcx> for CodegenCx<'_, 'tcx> {
11471147
}
11481148
}
11491149

1150-
impl<'tcx, 'll> HasParamEnv<'tcx> for CodegenCx<'ll, 'tcx> {
1150+
impl<'tcx, 'll> HasTypingEnv<'tcx> for CodegenCx<'ll, 'tcx> {
11511151
fn param_env(&self) -> ty::ParamEnv<'tcx> {
11521152
ty::ParamEnv::reveal_all()
11531153
}

compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn make_mir_scope<'ll, 'tcx>(
9494
// if this is moved to `rustc_codegen_ssa::mir::debuginfo`.
9595
let callee = cx.tcx.instantiate_and_normalize_erasing_regions(
9696
instance.args,
97-
ty::ParamEnv::reveal_all(),
97+
ty::TypingEnv::fully_monomorphized(),
9898
ty::EarlyBinder::bind(callee),
9999
);
100100
debug_context.inlined_function_scopes.entry(callee).or_insert_with(|| {

compiler/rustc_codegen_llvm/src/debuginfo/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
525525
if cx.tcx.trait_id_of_impl(impl_def_id).is_none() {
526526
let impl_self_ty = cx.tcx.instantiate_and_normalize_erasing_regions(
527527
instance.args,
528-
ty::ParamEnv::reveal_all(),
528+
ty::TypingEnv::fully_monomorphized(),
529529
cx.tcx.type_of(impl_def_id),
530530
);
531531

compiler/rustc_codegen_ssa/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ fn unsized_info<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
165165
) -> Bx::Value {
166166
let cx = bx.cx();
167167
let (source, target) =
168-
cx.tcx().struct_lockstep_tails_for_codegen(source, target, bx.param_env());
168+
cx.tcx().struct_lockstep_tails_for_codegen(source, target, bx.typing_env());
169169
match (source.kind(), target.kind()) {
170170
(&ty::Array(_, len), &ty::Slice(_)) => cx.const_usize(
171171
len.try_to_target_usize(cx.tcx()).expect("expected monomorphic const in codegen"),

compiler/rustc_codegen_ssa/src/mir/constant.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
6363
};
6464
let uv = self.monomorphize(uv);
6565
self.cx.tcx().const_eval_resolve_for_typeck(
66-
ty::TypingMode::PostAnalysis,
67-
ty::ParamEnv::reveal_all(),
66+
ty::TypingEnv::fully_monomorphized(),
6867
uv,
6968
constant.span,
7069
)

0 commit comments

Comments
 (0)