about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2024-11-19 19:32:52 +0100
committerlcnr <rust@lcnr.de>2024-11-19 19:32:52 +0100
commitb9dea31ea96b6eef91ab26307b0870783d4931ef (patch)
tree9975306e7f11dea53f2c230b0ace0d023c2993ef /compiler
parentd667dd56774686988b80d93d13391572e907231a (diff)
downloadrust-b9dea31ea96b6eef91ab26307b0870783d4931ef.tar.gz
rust-b9dea31ea96b6eef91ab26307b0870783d4931ef.zip
`TypingMode::from_param_env` begone
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_middle/src/ty/mod.rs6
-rw-r--r--compiler/rustc_type_ir/src/infer_ctxt.rs14
2 files changed, 0 insertions, 20 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs
index cddd6110c23..d1f8d1b0949 100644
--- a/compiler/rustc_middle/src/ty/mod.rs
+++ b/compiler/rustc_middle/src/ty/mod.rs
@@ -1140,12 +1140,6 @@ pub struct TypingEnv<'tcx> {
 }
 
 impl<'tcx> TypingEnv<'tcx> {
-    // FIXME(#132279): This method should be removed but simplifies the
-    // transition.
-    pub fn from_param_env(param_env: ParamEnv<'tcx>) -> TypingEnv<'tcx> {
-        TypingEnv { typing_mode: TypingMode::from_param_env(param_env), param_env }
-    }
-
     /// Create a typing environment with no where-clauses in scope
     /// where all opaque types and default associated items are revealed.
     ///
diff --git a/compiler/rustc_type_ir/src/infer_ctxt.rs b/compiler/rustc_type_ir/src/infer_ctxt.rs
index 105ae76708b..b01d3dc5269 100644
--- a/compiler/rustc_type_ir/src/infer_ctxt.rs
+++ b/compiler/rustc_type_ir/src/infer_ctxt.rs
@@ -4,10 +4,8 @@ use rustc_macros::{HashStable_NoContext, TyDecodable, TyEncodable};
 use rustc_type_ir_macros::{TypeFoldable_Generic, TypeVisitable_Generic};
 
 use crate::fold::TypeFoldable;
-use crate::inherent::*;
 use crate::relate::RelateResult;
 use crate::relate::combine::PredicateEmittingRelation;
-use crate::solve::Reveal;
 use crate::{self as ty, Interner};
 
 /// The current typing mode of an inference context. We unfortunately have some
@@ -58,18 +56,6 @@ impl<I: Interner> TypingMode<I> {
     pub fn analysis_in_body(cx: I, body_def_id: I::LocalDefId) -> TypingMode<I> {
         TypingMode::Analysis { defining_opaque_types: cx.opaque_types_defined_by(body_def_id) }
     }
-
-    /// FIXME(#132279): Using this function is questionable as the `param_env`
-    /// does not track `defining_opaque_types` and whether we're in coherence mode.
-    /// Many uses of this function should also use a not-yet implemented typing mode
-    /// which reveals already defined opaque types in the future. This function will
-    /// get completely removed at some point.
-    pub fn from_param_env(param_env: I::ParamEnv) -> TypingMode<I> {
-        match param_env.reveal() {
-            Reveal::UserFacing => TypingMode::non_body_analysis(),
-            Reveal::All => TypingMode::PostAnalysis,
-        }
-    }
 }
 
 pub trait InferCtxtLike: Sized {