Skip to content

Commit b9dea31

Browse files
committed
TypingMode::from_param_env begone
1 parent d667dd5 commit b9dea31

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

Diff for: compiler/rustc_middle/src/ty/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1140,12 +1140,6 @@ pub struct TypingEnv<'tcx> {
11401140
}
11411141

11421142
impl<'tcx> TypingEnv<'tcx> {
1143-
// FIXME(#132279): This method should be removed but simplifies the
1144-
// transition.
1145-
pub fn from_param_env(param_env: ParamEnv<'tcx>) -> TypingEnv<'tcx> {
1146-
TypingEnv { typing_mode: TypingMode::from_param_env(param_env), param_env }
1147-
}
1148-
11491143
/// Create a typing environment with no where-clauses in scope
11501144
/// where all opaque types and default associated items are revealed.
11511145
///

Diff for: compiler/rustc_type_ir/src/infer_ctxt.rs

-14
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ use rustc_macros::{HashStable_NoContext, TyDecodable, TyEncodable};
44
use rustc_type_ir_macros::{TypeFoldable_Generic, TypeVisitable_Generic};
55

66
use crate::fold::TypeFoldable;
7-
use crate::inherent::*;
87
use crate::relate::RelateResult;
98
use crate::relate::combine::PredicateEmittingRelation;
10-
use crate::solve::Reveal;
119
use crate::{self as ty, Interner};
1210

1311
/// The current typing mode of an inference context. We unfortunately have some
@@ -58,18 +56,6 @@ impl<I: Interner> TypingMode<I> {
5856
pub fn analysis_in_body(cx: I, body_def_id: I::LocalDefId) -> TypingMode<I> {
5957
TypingMode::Analysis { defining_opaque_types: cx.opaque_types_defined_by(body_def_id) }
6058
}
61-
62-
/// FIXME(#132279): Using this function is questionable as the `param_env`
63-
/// does not track `defining_opaque_types` and whether we're in coherence mode.
64-
/// Many uses of this function should also use a not-yet implemented typing mode
65-
/// which reveals already defined opaque types in the future. This function will
66-
/// get completely removed at some point.
67-
pub fn from_param_env(param_env: I::ParamEnv) -> TypingMode<I> {
68-
match param_env.reveal() {
69-
Reveal::UserFacing => TypingMode::non_body_analysis(),
70-
Reveal::All => TypingMode::PostAnalysis,
71-
}
72-
}
7359
}
7460

7561
pub trait InferCtxtLike: Sized {

0 commit comments

Comments
 (0)