@@ -21,7 +21,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
21
21
& self ,
22
22
bounds : & mut Bounds < ' tcx > ,
23
23
self_ty : Ty < ' tcx > ,
24
- ast_bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] ,
24
+ hir_bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] ,
25
25
self_ty_where_predicates : Option < ( LocalDefId , & ' tcx [ hir:: WherePredicate < ' tcx > ] ) > ,
26
26
span : Span ,
27
27
) {
@@ -32,9 +32,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
32
32
33
33
// Try to find an unbound in bounds.
34
34
let mut unbounds: SmallVec < [ _ ; 1 ] > = SmallVec :: new ( ) ;
35
- let mut search_bounds = |ast_bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] | {
36
- for ab in ast_bounds {
37
- let hir:: GenericBound :: Trait ( ptr, modifier) = ab else {
35
+ let mut search_bounds = |hir_bounds : & ' tcx [ hir:: GenericBound < ' tcx > ] | {
36
+ for hir_bound in hir_bounds {
37
+ let hir:: GenericBound :: Trait ( ptr, modifier) = hir_bound else {
38
38
continue ;
39
39
} ;
40
40
match modifier {
@@ -57,7 +57,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
57
57
}
58
58
}
59
59
} ;
60
- search_bounds ( ast_bounds ) ;
60
+ search_bounds ( hir_bounds ) ;
61
61
if let Some ( ( self_ty, where_clause) ) = self_ty_where_predicates {
62
62
for clause in where_clause {
63
63
if let hir:: WherePredicate :: BoundPredicate ( pred) = clause
@@ -106,28 +106,28 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
106
106
///
107
107
/// ```ignore (illustrative)
108
108
/// fn foo<T: Debug>() { }
109
- /// // ^ ^^^^^ `ast_bounds `, in HIR form
109
+ /// // ^ ^^^^^ `hir_bounds `, in HIR form
110
110
/// // |
111
111
/// // `param_ty`, in ty form
112
112
/// ```
113
113
///
114
114
/// ### A Note on Binders
115
115
///
116
- /// There is an implied binder around `param_ty` and `ast_bounds `.
116
+ /// There is an implied binder around `param_ty` and `hir_bounds `.
117
117
/// See `lower_poly_trait_ref` for more details.
118
- #[ instrument( level = "debug" , skip( self , ast_bounds , bounds) ) ]
118
+ #[ instrument( level = "debug" , skip( self , hir_bounds , bounds) ) ]
119
119
pub ( crate ) fn lower_poly_bounds < ' hir , I : Iterator < Item = & ' hir hir:: GenericBound < ' tcx > > > (
120
120
& self ,
121
121
param_ty : Ty < ' tcx > ,
122
- ast_bounds : I ,
122
+ hir_bounds : I ,
123
123
bounds : & mut Bounds < ' tcx > ,
124
124
bound_vars : & ' tcx ty:: List < ty:: BoundVariableKind > ,
125
125
only_self_bounds : OnlySelfBounds ,
126
126
) where
127
127
' tcx : ' hir ,
128
128
{
129
- for ast_bound in ast_bounds {
130
- match ast_bound {
129
+ for hir_bound in hir_bounds {
130
+ match hir_bound {
131
131
hir:: GenericBound :: Trait ( poly_trait_ref, modifier) => {
132
132
let ( constness, polarity) = match modifier {
133
133
hir:: TraitBoundModifier :: Const => {
@@ -176,13 +176,13 @@ 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
pub ( crate ) fn lower_mono_bounds (
183
183
& self ,
184
184
param_ty : Ty < ' tcx > ,
185
- ast_bounds : & [ hir:: GenericBound < ' tcx > ] ,
185
+ hir_bounds : & [ hir:: GenericBound < ' tcx > ] ,
186
186
filter : PredicateFilter ,
187
187
) -> Bounds < ' tcx > {
188
188
let mut bounds = Bounds :: default ( ) ;
@@ -196,7 +196,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
196
196
197
197
self . lower_poly_bounds (
198
198
param_ty,
199
- ast_bounds . iter ( ) . filter ( |bound| match filter {
199
+ hir_bounds . iter ( ) . filter ( |bound| match filter {
200
200
PredicateFilter :: All
201
201
| PredicateFilter :: SelfOnly
202
202
| PredicateFilter :: SelfAndAssociatedTypeBounds => true ,
@@ -500,7 +500,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
500
500
}
501
501
// Lower a constraint like `Item: Debug` as found in HIR bound `T: Iterator<Item: Debug>`
502
502
// to a bound involving a projection: `<T as Iterator>::Item: Debug`.
503
- hir:: TypeBindingKind :: Constraint { bounds : ast_bounds } => {
503
+ hir:: TypeBindingKind :: Constraint { bounds : hir_bounds } => {
504
504
// NOTE: If `only_self_bounds` is true, do NOT expand this associated type bound into
505
505
// a trait predicate, since we only want to add predicates for the `Self` type.
506
506
if !only_self_bounds. 0 {
@@ -509,7 +509,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
509
509
let param_ty = Ty :: new_alias ( tcx, ty:: Projection , projection_ty. skip_binder ( ) ) ;
510
510
self . lower_poly_bounds (
511
511
param_ty,
512
- ast_bounds . iter ( ) ,
512
+ hir_bounds . iter ( ) ,
513
513
bounds,
514
514
projection_ty. bound_vars ( ) ,
515
515
only_self_bounds,
0 commit comments