File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ impl Spanned for ast::GenericArg {
180180impl Spanned for ast:: GenericBound {
181181 fn span ( & self ) -> Span {
182182 match * self {
183- ast:: GenericBound :: Trait ( ref ptr, _ ) => ptr. span ,
183+ ast:: GenericBound :: Trait ( ref ptr) => ptr. span ,
184184 ast:: GenericBound :: Outlives ( ref l) => l. ident . span ,
185185 ast:: GenericBound :: Use ( _, span) => span,
186186 }
Original file line number Diff line number Diff line change @@ -610,16 +610,14 @@ impl Rewrite for ast::GenericBound {
610610
611611 fn rewrite_result ( & self , context : & RewriteContext < ' _ > , shape : Shape ) -> RewriteResult {
612612 match * self {
613- ast:: GenericBound :: Trait (
614- ref poly_trait_ref,
615- ast:: TraitBoundModifiers {
613+ ast:: GenericBound :: Trait ( ref poly_trait_ref) => {
614+ let snippet = context. snippet ( self . span ( ) ) ;
615+ let has_paren = snippet. starts_with ( '(' ) && snippet. ends_with ( ')' ) ;
616+ let ast:: TraitBoundModifiers {
616617 constness,
617618 asyncness,
618619 polarity,
619- } ,
620- ) => {
621- let snippet = context. snippet ( self . span ( ) ) ;
622- let has_paren = snippet. starts_with ( '(' ) && snippet. ends_with ( ')' ) ;
620+ } = poly_trait_ref. modifiers ;
623621 let mut constness = constness. as_str ( ) . to_string ( ) ;
624622 if !constness. is_empty ( ) {
625623 constness. push ( ' ' ) ;
You can’t perform that action at this time.
0 commit comments