File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,14 @@ impl Spanned for ast::Param {
113
113
114
114
impl Spanned for ast:: GenericParam {
115
115
fn span ( & self ) -> Span {
116
- let lo = if self . attrs . is_empty ( ) {
116
+ let lo = if let ast:: GenericParamKind :: Const {
117
+ ty : _,
118
+ kw_span,
119
+ default : _,
120
+ } = self . kind
121
+ {
122
+ kw_span. lo ( )
123
+ } else if self . attrs . is_empty ( ) {
117
124
self . ident . span . lo ( )
118
125
} else {
119
126
self . attrs [ 0 ] . span . lo ( )
Original file line number Diff line number Diff line change @@ -563,7 +563,12 @@ impl Rewrite for ast::GenericParam {
563
563
_ => ( ) ,
564
564
}
565
565
566
- if let rustc_ast:: ast:: GenericParamKind :: Const { ref ty, .. } = & self . kind {
566
+ if let ast:: GenericParamKind :: Const {
567
+ ref ty,
568
+ kw_span : _,
569
+ default : _,
570
+ } = & self . kind
571
+ {
567
572
result. push_str ( "const " ) ;
568
573
result. push_str ( rewrite_ident ( context, self . ident ) ) ;
569
574
result. push_str ( ": " ) ;
You can’t perform that action at this time.
0 commit comments