@@ -100,8 +100,7 @@ impl<'tcx> TyCtxt<'tcx> {
100
100
/// codegen, we need to normalize the contents.
101
101
// FIXME(@lcnr): This method should not be necessary, we now normalize
102
102
// 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`.
105
104
#[ tracing:: instrument( level = "debug" , skip( self , param_env) ) ]
106
105
pub fn normalize_erasing_late_bound_regions < T > (
107
106
self ,
@@ -115,26 +114,6 @@ impl<'tcx> TyCtxt<'tcx> {
115
114
self . normalize_erasing_regions ( param_env, value)
116
115
}
117
116
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
-
138
117
/// Monomorphizes a type from the AST by first applying the
139
118
/// in-scope instantiations and then normalizing any associated
140
119
/// types.
0 commit comments