@@ -12,13 +12,13 @@ use rustc_trait_selection::traits;
1212use rustc_type_ir:: visit:: { TypeSuperVisitable , TypeVisitable , TypeVisitableExt , TypeVisitor } ;
1313use smallvec:: SmallVec ;
1414
15- use crate :: astconv:: { AstConv , OnlySelfBounds , PredicateFilter } ;
15+ use crate :: astconv:: { HirTyLowerer , OnlySelfBounds , PredicateFilter } ;
1616use crate :: bounds:: Bounds ;
1717use crate :: errors;
1818
19- impl < ' tcx > dyn AstConv < ' tcx > + ' _ {
19+ impl < ' tcx > dyn HirTyLowerer < ' tcx > + ' _ {
2020 /// Sets `implicitly_sized` to true on `Bounds` if necessary
21- pub ( crate ) fn add_implicitly_sized (
21+ pub ( crate ) fn add_sized_bound (
2222 & self ,
2323 bounds : & mut Bounds < ' tcx > ,
2424 self_ty : Ty < ' tcx > ,
@@ -117,7 +117,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
117117 /// `param_ty` and `ast_bounds`. See `instantiate_poly_trait_ref`
118118 /// for more details.
119119 #[ instrument( level = "debug" , skip( self , ast_bounds, bounds) ) ]
120- pub ( crate ) fn add_bounds < ' hir , I : Iterator < Item = & ' hir hir:: GenericBound < ' tcx > > > (
120+ pub ( crate ) fn lower_poly_bounds < ' hir , I : Iterator < Item = & ' hir hir:: GenericBound < ' tcx > > > (
121121 & self ,
122122 param_ty : Ty < ' tcx > ,
123123 ast_bounds : I ,
@@ -145,7 +145,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
145145 }
146146 hir:: TraitBoundModifier :: Maybe => continue ,
147147 } ;
148- let _ = self . instantiate_poly_trait_ref (
148+ let _ = self . lower_poly_trait_ref (
149149 & poly_trait_ref. trait_ref ,
150150 poly_trait_ref. span ,
151151 constness,
@@ -156,7 +156,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
156156 ) ;
157157 }
158158 hir:: GenericBound :: Outlives ( lifetime) => {
159- let region = self . ast_region_to_region ( lifetime, None ) ;
159+ let region = self . lower_lifetime ( lifetime, None ) ;
160160 bounds. push_region_bound (
161161 self . tcx ( ) ,
162162 ty:: Binder :: bind_with_vars (
@@ -186,7 +186,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
186186 /// example above, but is not true in supertrait listings like `trait Foo: Bar + Baz`.
187187 ///
188188 /// `span` should be the declaration size of the parameter.
189- pub ( crate ) fn compute_bounds (
189+ pub ( crate ) fn lower_mono_bounds (
190190 & self ,
191191 param_ty : Ty < ' tcx > ,
192192 ast_bounds : & [ hir:: GenericBound < ' tcx > ] ,
@@ -201,7 +201,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
201201 PredicateFilter :: SelfOnly | PredicateFilter :: SelfThatDefines ( _) => OnlySelfBounds ( true ) ,
202202 } ;
203203
204- self . add_bounds (
204+ self . lower_poly_bounds (
205205 param_ty,
206206 ast_bounds. iter ( ) . filter ( |bound| match filter {
207207 PredicateFilter :: All
@@ -234,7 +234,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
234234 /// `trait_ref` here will be `for<'a> T: Iterator`. The `binding` data however is from *inside*
235235 /// the binder (e.g., `&'a u32`) and hence may reference bound regions.
236236 #[ instrument( level = "debug" , skip( self , bounds, dup_bindings, path_span) ) ]
237- pub ( super ) fn add_predicates_for_ast_type_binding (
237+ pub ( super ) fn lower_assoc_item_binding (
238238 & self ,
239239 hir_ref_id : hir:: HirId ,
240240 trait_ref : ty:: PolyTraitRef < ' tcx > ,
@@ -272,7 +272,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
272272 ty:: AssocKind :: Type
273273 } ;
274274
275- let candidate = if self . trait_defines_associated_item_named (
275+ let candidate = if self . probe_trait_that_defines_assoc_item (
276276 trait_ref. def_id ( ) ,
277277 assoc_kind,
278278 binding. ident ,
@@ -282,7 +282,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
282282 } else {
283283 // Otherwise, we have to walk through the supertraits to find
284284 // one that does define it.
285- self . one_bound_for_assoc_item (
285+ self . probe_single_bound_for_assoc_item (
286286 || traits:: supertraits ( tcx, trait_ref) ,
287287 trait_ref. skip_binder ( ) . print_only_trait_name ( ) ,
288288 None ,
@@ -417,7 +417,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
417417 infer_args : false ,
418418 } ;
419419
420- let alias_args = self . create_args_for_associated_item (
420+ let alias_args = self . lower_generic_args_of_assoc_item (
421421 path_span,
422422 assoc_item. def_id ,
423423 & item_segment,
@@ -451,7 +451,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
451451 }
452452 hir:: TypeBindingKind :: Equality { term } => {
453453 let term = match term {
454- hir:: Term :: Ty ( ty) => self . ast_ty_to_ty ( ty) . into ( ) ,
454+ hir:: Term :: Ty ( ty) => self . lower_ty ( ty) . into ( ) ,
455455 hir:: Term :: Const ( ct) => ty:: Const :: from_anon_const ( tcx, ct. def_id ) . into ( ) ,
456456 } ;
457457
@@ -514,7 +514,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
514514 // for the `Self` type.
515515 if !only_self_bounds. 0 {
516516 let param_ty = Ty :: new_alias ( tcx, ty:: Projection , projection_ty. skip_binder ( ) ) ;
517- self . add_bounds (
517+ self . lower_poly_bounds (
518518 param_ty,
519519 ast_bounds. iter ( ) ,
520520 bounds,
0 commit comments