File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2263,11 +2263,10 @@ fn rewrite_fn_base(
22632263
22642264 // Skip `pub(crate)`.
22652265 let lo_after_visibility = get_bytepos_after_visibility ( & fn_sig. visibility , span) ;
2266- // A conservative estimation, to goal is to be over all parens in generics
2266+ // A conservative estimation, the goal is to be over all parens in generics
22672267 let params_start = fn_sig
22682268 . generics
22692269 . params
2270- . iter ( )
22712270 . last ( )
22722271 . map_or ( lo_after_visibility, |param| param. span ( ) . hi ( ) ) ;
22732272 let params_end = if fd. inputs . is_empty ( ) {
Original file line number Diff line number Diff line change @@ -131,7 +131,8 @@ impl Spanned for ast::GenericParam {
131131 } ;
132132 let ty_hi = if let ast:: GenericParamKind :: Type {
133133 default : Some ( ref ty) ,
134- } = self . kind
134+ }
135+ | ast:: GenericParamKind :: Const { ref ty, .. } = self . kind
135136 {
136137 ty. span ( ) . hi ( )
137138 } else {
Original file line number Diff line number Diff line change 1+ #![ feature( const_generics) ]
2+
3+ fn foo <
4+ const N : [ u8 ; {
5+ struct Inner < ' a > ( & ' a ( ) ) ;
6+ 3
7+ } ] ,
8+ > ( ) {
9+ }
You can’t perform that action at this time.
0 commit comments