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 {
180
180
impl Spanned for ast:: GenericBound {
181
181
fn span ( & self ) -> Span {
182
182
match * self {
183
- ast:: GenericBound :: Trait ( ref ptr, _ ) => ptr. span ,
183
+ ast:: GenericBound :: Trait ( ref ptr) => ptr. span ,
184
184
ast:: GenericBound :: Outlives ( ref l) => l. ident . span ,
185
185
ast:: GenericBound :: Use ( _, span) => span,
186
186
}
Original file line number Diff line number Diff line change @@ -610,16 +610,14 @@ impl Rewrite for ast::GenericBound {
610
610
611
611
fn rewrite_result ( & self , context : & RewriteContext < ' _ > , shape : Shape ) -> RewriteResult {
612
612
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 {
616
617
constness,
617
618
asyncness,
618
619
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 ;
623
621
let mut constness = constness. as_str ( ) . to_string ( ) ;
624
622
if !constness. is_empty ( ) {
625
623
constness. push ( ' ' ) ;
You can’t perform that action at this time.
0 commit comments