File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2217,11 +2217,10 @@ fn rewrite_fn_base(
22172217
22182218 // Skip `pub(crate)`.
22192219 let lo_after_visibility = get_bytepos_after_visibility ( & fn_sig. visibility , span) ;
2220- // A conservative estimation, to goal is to be over all parens in generics
2220+ // A conservative estimation, the goal is to be over all parens in generics
22212221 let params_start = fn_sig
22222222 . generics
22232223 . params
2224- . iter ( )
22252224 . last ( )
22262225 . map_or ( lo_after_visibility, |param| param. span ( ) . hi ( ) ) ;
22272226 let params_end = if fd. inputs . is_empty ( ) {
Original file line number Diff line number Diff line change @@ -132,7 +132,8 @@ impl Spanned for ast::GenericParam {
132132 } ;
133133 let ty_hi = if let ast:: GenericParamKind :: Type {
134134 default : Some ( ref ty) ,
135- } = self . kind
135+ }
136+ | ast:: GenericParamKind :: Const { ref ty, .. } = self . kind
136137 {
137138 ty. span ( ) . hi ( )
138139 } 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