Skip to content

Commit c122e71

Browse files
committed
w
1 parent 3f4a709 commit c122e71

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

compiler/rustc_middle/src/ty/normalize_erasing_regions.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
1111
use tracing::{debug, instrument};
1212

13-
use super::PseudoCanonicalInput;
1413
use crate::traits::query::NoSolution;
1514
use crate::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeFolder};
1615
use crate::ty::{self, EarlyBinder, GenericArgsRef, Ty, TyCtxt, TypeVisitableExt};

compiler/rustc_mir_build/src/build/custom/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use rustc_index::{IndexSlice, IndexVec};
2525
use rustc_middle::mir::*;
2626
use rustc_middle::span_bug;
2727
use rustc_middle::thir::*;
28-
use rustc_middle::ty::{ParamEnv, Ty, TyCtxt};
28+
use rustc_middle::ty::{self, Ty, TyCtxt};
2929
use rustc_span::Span;
3030

3131
mod parse;
@@ -77,7 +77,7 @@ pub(super) fn build_custom_mir<'tcx>(
7777

7878
let mut pctxt = ParseCtxt {
7979
tcx,
80-
param_env: tcx.param_env(did),
80+
typing_env: body.typing_env(tcx),
8181
thir,
8282
source_scope: OUTERMOST_SOURCE_SCOPE,
8383
body: &mut body,
@@ -136,7 +136,7 @@ fn parse_attribute(attr: &Attribute) -> MirPhase {
136136

137137
struct ParseCtxt<'a, 'tcx> {
138138
tcx: TyCtxt<'tcx>,
139-
param_env: ParamEnv<'tcx>,
139+
typing_env: ty::TypingEnv<'tcx>,
140140
thir: &'a Thir<'tcx>,
141141
source_scope: SourceScope,
142142
body: &'a mut Body<'tcx>,

compiler/rustc_mir_build/src/build/custom/parse/instruction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl<'a, 'tcx> ParseCtxt<'a, 'tcx> {
151151
expected: "constant pattern".to_string(),
152152
});
153153
};
154-
values.push(value.eval_bits(self.tcx, ty::TypingEnv::from_param_env(self.param_env)));
154+
values.push(value.eval_bits(self.tcx, self.typing_env));
155155
targets.push(self.parse_block(arm.body)?);
156156
}
157157

@@ -385,7 +385,7 @@ impl<'a, 'tcx> ParseCtxt<'a, 'tcx> {
385385
| ExprKind::NonHirLiteral { .. }
386386
| ExprKind::ConstBlock { .. } => Ok({
387387
let value = as_constant_inner(expr, |_| None, self.tcx);
388-
value.const_.eval_bits(self.tcx, ty::TypingEnv::from_param_env(self.param_env))
388+
value.const_.eval_bits(self.tcx, self.typing_env)
389389
}),
390390
)
391391
}

0 commit comments

Comments
 (0)