@@ -20,7 +20,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
20
20
& self ,
21
21
bounds : & mut Bounds < ' tcx > ,
22
22
self_ty : Ty < ' tcx > ,
23
- ast_bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] ,
23
+ hir_bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] ,
24
24
self_ty_where_predicates : Option < ( LocalDefId , & ' tcx [ hir:: WherePredicate < ' tcx > ] ) > ,
25
25
span : Span ,
26
26
) {
@@ -31,9 +31,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
31
31
32
32
// Try to find an unbound in bounds.
33
33
let mut unbounds: SmallVec < [ _ ; 1 ] > = SmallVec :: new ( ) ;
34
- let mut search_bounds = |ast_bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] | {
35
- for ab in ast_bounds {
36
- let hir:: GenericBound :: Trait ( ptr, modifier) = ab else {
34
+ let mut search_bounds = |hir_bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] | {
35
+ for hir_bound in hir_bounds {
36
+ let hir:: GenericBound :: Trait ( ptr, modifier) = hir_bound else {
37
37
continue ;
38
38
} ;
39
39
match modifier {
@@ -56,7 +56,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
56
56
}
57
57
}
58
58
} ;
59
- search_bounds ( ast_bounds ) ;
59
+ search_bounds ( hir_bounds ) ;
60
60
if let Some ( ( self_ty, where_clause) ) = self_ty_where_predicates {
61
61
for clause in where_clause {
62
62
if let hir:: WherePredicate :: BoundPredicate ( pred) = clause
@@ -105,28 +105,28 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
105
105
///
106
106
/// ```ignore (illustrative)
107
107
/// fn foo<T: Debug>() { }
108
- /// ^ ^^^^^ `ast_bounds `, in HIR form
108
+ /// ^ ^^^^^ `hir_bounds `, in HIR form
109
109
/// |
110
110
/// `param_ty`, in ty form
111
111
/// ```
112
112
///
113
113
/// ### A Note on Binders
114
114
///
115
- /// There is an implied binder around `param_ty` and `ast_bounds `.
115
+ /// There is an implied binder around `param_ty` and `hir_bounds `.
116
116
/// See `lower_poly_trait_ref` for more details.
117
- #[ instrument( level = "debug" , skip( self , ast_bounds , bounds) ) ]
117
+ #[ instrument( level = "debug" , skip( self , hir_bounds , bounds) ) ]
118
118
pub ( crate ) fn lower_bounds < ' hir , I : Iterator < Item = & ' hir hir:: GenericBound < ' tcx > > > (
119
119
& self ,
120
120
param_ty : Ty < ' tcx > ,
121
- ast_bounds : I ,
121
+ hir_bounds : I ,
122
122
bounds : & mut Bounds < ' tcx > ,
123
123
bound_vars : & ' tcx ty:: List < ty:: BoundVariableKind > ,
124
124
only_self_bounds : OnlySelfBounds ,
125
125
) where
126
126
' tcx : ' hir ,
127
127
{
128
- for ast_bound in ast_bounds {
129
- match ast_bound {
128
+ for hir_bound in hir_bounds {
129
+ match hir_bound {
130
130
hir:: GenericBound :: Trait ( poly_trait_ref, modifier) => {
131
131
let ( constness, polarity) = match modifier {
132
132
hir:: TraitBoundModifier :: Const => {
@@ -176,15 +176,15 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
176
176
///
177
177
/// ```ignore (illustrative)
178
178
/// fn foo<T: Bar + Baz>() { }
179
- /// // ^ ^^^^^^^^^ ast_bounds
179
+ /// // ^ ^^^^^^^^^ hir_bounds
180
180
/// // param_ty
181
181
/// ```
182
182
// FIXME(astconv-no-more): This should renamed to make it clear how it differs from `lower_bounds`
183
183
// Maybe `lower_mono_bounds` (as in no bound vars)?
184
184
pub ( crate ) fn compute_bounds (
185
185
& self ,
186
186
param_ty : Ty < ' tcx > ,
187
- ast_bounds : & [ hir:: GenericBound < ' tcx > ] ,
187
+ hir_bounds : & [ hir:: GenericBound < ' tcx > ] ,
188
188
filter : PredicateFilter ,
189
189
) -> Bounds < ' tcx > {
190
190
let mut bounds = Bounds :: default ( ) ;
@@ -198,7 +198,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
198
198
199
199
self . lower_bounds (
200
200
param_ty,
201
- ast_bounds . iter ( ) . filter ( |bound| match filter {
201
+ hir_bounds . iter ( ) . filter ( |bound| match filter {
202
202
PredicateFilter :: All
203
203
| PredicateFilter :: SelfOnly
204
204
| PredicateFilter :: SelfAndAssociatedTypeBounds => true ,
@@ -490,7 +490,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
490
490
}
491
491
// Lower a constraint like `Item: Debug` as found in HIR bound `T: Iterator<Item: Debug>`
492
492
// to a bound involving a projection: `<T as Iterator>::Item: Debug`.
493
- hir:: TypeBindingKind :: Constraint { bounds : ast_bounds } => {
493
+ hir:: TypeBindingKind :: Constraint { bounds : hir_bounds } => {
494
494
// NOTE: If `only_self_bounds` is true, do NOT expand this associated type bound into
495
495
// a trait predicate, since we only want to add predicates for the `Self` type.
496
496
if !only_self_bounds. 0 {
@@ -499,7 +499,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
499
499
let param_ty = Ty :: new_alias ( tcx, ty:: Projection , projection_ty. skip_binder ( ) ) ;
500
500
self . lower_bounds (
501
501
param_ty,
502
- ast_bounds . iter ( ) ,
502
+ hir_bounds . iter ( ) ,
503
503
bounds,
504
504
projection_ty. bound_vars ( ) ,
505
505
only_self_bounds,
0 commit comments