@@ -10,12 +10,12 @@ use rustc_trait_selection::traits;
1010use smallvec:: SmallVec ;
1111
1212use crate :: astconv:: {
13- AstConv , ConvertedBinding , ConvertedBindingKind , OnlySelfBounds , PredicateFilter ,
13+ HirTyLowerer , LoweredBinding , LoweredBindingKind , OnlySelfBounds , PredicateFilter ,
1414} ;
1515use crate :: bounds:: Bounds ;
1616use crate :: errors;
1717
18- impl < ' tcx > dyn AstConv < ' tcx > + ' _ {
18+ impl < ' tcx > dyn HirTyLowerer < ' tcx > + ' _ {
1919 /// Sets `implicitly_sized` to true on `Bounds` if necessary
2020 pub ( crate ) fn add_implicitly_sized (
2121 & self ,
@@ -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_region ( lifetime, None ) ;
160160 bounds. push_region_bound (
161161 self . tcx ( ) ,
162162 ty:: Binder :: bind_with_vars (
@@ -234,11 +234,11 @@ 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, speculative, dup_bindings, path_span) ) ]
237- pub ( super ) fn add_predicates_for_ast_type_binding (
237+ pub ( super ) fn lower_type_bindings_to_predicates (
238238 & self ,
239239 hir_ref_id : hir:: HirId ,
240240 trait_ref : ty:: PolyTraitRef < ' tcx > ,
241- binding : & ConvertedBinding < ' _ , ' tcx > ,
241+ binding : & LoweredBinding < ' _ , ' tcx > ,
242242 bounds : & mut Bounds < ' tcx > ,
243243 speculative : bool ,
244244 dup_bindings : & mut FxIndexMap < DefId , Span > ,
@@ -266,15 +266,15 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
266266 let assoc_kind =
267267 if binding. gen_args . parenthesized == hir:: GenericArgsParentheses :: ReturnTypeNotation {
268268 ty:: AssocKind :: Fn
269- } else if let ConvertedBindingKind :: Equality ( term) = binding. kind
269+ } else if let LoweredBindingKind :: Equality ( term) = binding. kind
270270 && let ty:: TermKind :: Const ( _) = term. node . unpack ( )
271271 {
272272 ty:: AssocKind :: Const
273273 } else {
274274 ty:: AssocKind :: Type
275275 } ;
276276
277- let candidate = if self . trait_defines_associated_item_named (
277+ let candidate = if self . trait_defines_assoc_item_named (
278278 trait_ref. def_id ( ) ,
279279 assoc_kind,
280280 binding. item_name ,
@@ -421,7 +421,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
421421 infer_args : false ,
422422 } ;
423423
424- let args_trait_ref_and_assoc_item = self . create_args_for_associated_item (
424+ let args_trait_ref_and_assoc_item = self . lower_args_for_assoc_item (
425425 path_span,
426426 assoc_item. def_id ,
427427 & item_segment,
@@ -442,7 +442,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
442442 //
443443 // for<'a> <T as Iterator>::Item = &'a str // <-- 'a is bad
444444 // for<'a> <T as FnMut<(&'a u32,)>>::Output = &'a str // <-- 'a is ok
445- if let ConvertedBindingKind :: Equality ( ty) = binding. kind {
445+ if let LoweredBindingKind :: Equality ( ty) = binding. kind {
446446 let late_bound_in_trait_ref =
447447 tcx. collect_constrained_late_bound_regions ( & projection_ty) ;
448448 let late_bound_in_ty =
@@ -472,12 +472,12 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
472472 }
473473
474474 match binding. kind {
475- ConvertedBindingKind :: Equality ( ..) if let ty:: AssocKind :: Fn = assoc_kind => {
475+ LoweredBindingKind :: Equality ( ..) if let ty:: AssocKind :: Fn = assoc_kind => {
476476 return Err ( self . tcx ( ) . dcx ( ) . emit_err (
477477 crate :: errors:: ReturnTypeNotationEqualityBound { span : binding. span } ,
478478 ) ) ;
479479 }
480- ConvertedBindingKind :: Equality ( term) => {
480+ LoweredBindingKind :: Equality ( term) => {
481481 // "Desugar" a constraint like `T: Iterator<Item = u32>` this to
482482 // the "projection predicate" for:
483483 //
@@ -491,7 +491,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
491491 binding. span ,
492492 ) ;
493493 }
494- ConvertedBindingKind :: Constraint ( ast_bounds) => {
494+ LoweredBindingKind :: Constraint ( ast_bounds) => {
495495 // "Desugar" a constraint like `T: Iterator<Item: Debug>` to
496496 //
497497 // `<T as Iterator>::Item: Debug`
0 commit comments