@@ -1219,11 +1219,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
12191219let bound = this. lower_poly_trait_ref (
12201220& PolyTraitRef {
12211221bound_generic_params : ThinVec :: new ( ) ,
1222+ modifiers : TraitBoundModifiers :: NONE ,
12221223trait_ref : TraitRef { path : path. clone ( ) , ref_id : t. id } ,
12231224span : t. span ,
12241225} ,
12251226 itctx,
1226- TraitBoundModifiers :: NONE ,
12271227) ;
12281228let bounds = this. arena . alloc_from_iter ( [ bound] ) ;
12291229let lifetime_bound = this. elided_dyn_bound ( t. span ) ;
@@ -1325,8 +1325,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
13251325// We can safely ignore constness here since AST validation
13261326// takes care of rejecting invalid modifier combinations and
13271327// 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) ;
13301330Some ( trait_ref)
13311331}
13321332GenericBound :: Outlives ( lifetime) => {
@@ -1974,9 +1974,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
19741974itctx : ImplTraitContext ,
19751975) -> hir:: GenericBound < ' hir > {
19761976match 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) ) ,
19801978GenericBound :: Outlives ( lifetime) => {
19811979 hir:: GenericBound :: Outlives ( self . lower_lifetime ( lifetime) )
19821980}
@@ -2180,12 +2178,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
21802178& mut self ,
21812179p : & PolyTraitRef ,
21822180itctx : ImplTraitContext ,
2183- modifiers : ast:: TraitBoundModifiers ,
21842181) -> hir:: PolyTraitRef < ' hir > {
21852182let bound_generic_params =
21862183self . 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 ) ;
21892186 hir:: PolyTraitRef {
21902187 bound_generic_params,
21912188 modifiers,
0 commit comments