@@ -1219,11 +1219,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1219
1219
let bound = this. lower_poly_trait_ref (
1220
1220
& PolyTraitRef {
1221
1221
bound_generic_params : ThinVec :: new ( ) ,
1222
+ modifiers : TraitBoundModifiers :: NONE ,
1222
1223
trait_ref : TraitRef { path : path. clone ( ) , ref_id : t. id } ,
1223
1224
span : t. span ,
1224
1225
} ,
1225
1226
itctx,
1226
- TraitBoundModifiers :: NONE ,
1227
1227
) ;
1228
1228
let bounds = this. arena . alloc_from_iter ( [ bound] ) ;
1229
1229
let lifetime_bound = this. elided_dyn_bound ( t. span ) ;
@@ -1325,8 +1325,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1325
1325
// We can safely ignore constness here since AST validation
1326
1326
// takes care of rejecting invalid modifier combinations and
1327
1327
// const trait bounds in trait object types.
1328
- GenericBound :: Trait ( ty, modifiers ) => {
1329
- let trait_ref = this. lower_poly_trait_ref ( ty, itctx, * modifiers ) ;
1328
+ GenericBound :: Trait ( ty) => {
1329
+ let trait_ref = this. lower_poly_trait_ref ( ty, itctx) ;
1330
1330
Some ( trait_ref)
1331
1331
}
1332
1332
GenericBound :: Outlives ( lifetime) => {
@@ -1974,9 +1974,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1974
1974
itctx : ImplTraitContext ,
1975
1975
) -> hir:: GenericBound < ' hir > {
1976
1976
match tpb {
1977
- GenericBound :: Trait ( p, modifiers) => {
1978
- hir:: GenericBound :: Trait ( self . lower_poly_trait_ref ( p, itctx, * modifiers) )
1979
- }
1977
+ GenericBound :: Trait ( p) => hir:: GenericBound :: Trait ( self . lower_poly_trait_ref ( p, itctx) ) ,
1980
1978
GenericBound :: Outlives ( lifetime) => {
1981
1979
hir:: GenericBound :: Outlives ( self . lower_lifetime ( lifetime) )
1982
1980
}
@@ -2180,12 +2178,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
2180
2178
& mut self ,
2181
2179
p : & PolyTraitRef ,
2182
2180
itctx : ImplTraitContext ,
2183
- modifiers : ast:: TraitBoundModifiers ,
2184
2181
) -> hir:: PolyTraitRef < ' hir > {
2185
2182
let bound_generic_params =
2186
2183
self . lower_lifetime_binder ( p. trait_ref . ref_id , & p. bound_generic_params ) ;
2187
- let trait_ref = self . lower_trait_ref ( modifiers, & p. trait_ref , itctx) ;
2188
- let modifiers = self . lower_trait_bound_modifiers ( modifiers) ;
2184
+ let trait_ref = self . lower_trait_ref ( p . modifiers , & p. trait_ref , itctx) ;
2185
+ let modifiers = self . lower_trait_bound_modifiers ( p . modifiers ) ;
2189
2186
hir:: PolyTraitRef {
2190
2187
bound_generic_params,
2191
2188
modifiers,
0 commit comments