@@ -4,10 +4,8 @@ use rustc_macros::{HashStable_NoContext, TyDecodable, TyEncodable};
44use rustc_type_ir_macros:: { TypeFoldable_Generic , TypeVisitable_Generic } ;
55
66use crate :: fold:: TypeFoldable ;
7- use crate :: inherent:: * ;
87use crate :: relate:: RelateResult ;
98use crate :: relate:: combine:: PredicateEmittingRelation ;
10- use crate :: solve:: Reveal ;
119use 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
7561pub trait InferCtxtLike : Sized {
0 commit comments