@@ -100,8 +100,7 @@ impl<'tcx> TyCtxt<'tcx> {
100100 /// codegen, we need to normalize the contents.
101101 // FIXME(@lcnr): This method should not be necessary, we now normalize
102102 // inside of binders. We should be able to only use
103- // `tcx.instantiate_bound_regions_with_erased`. Same for the `try_X`
104- // variant.
103+ // `tcx.instantiate_bound_regions_with_erased`.
105104 #[ tracing:: instrument( level = "debug" , skip( self , param_env) ) ]
106105 pub fn normalize_erasing_late_bound_regions < T > (
107106 self ,
@@ -115,26 +114,6 @@ impl<'tcx> TyCtxt<'tcx> {
115114 self . normalize_erasing_regions ( param_env, value)
116115 }
117116
118- /// If you have a `Binder<'tcx, T>`, you can do this to strip out the
119- /// late-bound regions and then normalize the result, yielding up
120- /// a `T` (with regions erased). This is appropriate when the
121- /// binder is being instantiated at the call site.
122- ///
123- /// N.B., currently, higher-ranked type bounds inhibit
124- /// normalization. Therefore, each time we erase them in
125- /// codegen, we need to normalize the contents.
126- pub fn try_normalize_erasing_late_bound_regions < T > (
127- self ,
128- param_env : ty:: ParamEnv < ' tcx > ,
129- value : ty:: Binder < ' tcx , T > ,
130- ) -> Result < T , NormalizationError < ' tcx > >
131- where
132- T : TypeFoldable < TyCtxt < ' tcx > > ,
133- {
134- let value = self . instantiate_bound_regions_with_erased ( value) ;
135- self . try_normalize_erasing_regions ( param_env, value)
136- }
137-
138117 /// Monomorphizes a type from the AST by first applying the
139118 /// in-scope instantiations and then normalizing any associated
140119 /// types.
0 commit comments