File tree 3 files changed +12
-3
lines changed
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(
2263
2263
2264
2264
// Skip `pub(crate)`.
2265
2265
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
2267
2267
let params_start = fn_sig
2268
2268
. generics
2269
2269
. params
2270
- . iter ( )
2271
2270
. last ( )
2272
2271
. map_or ( lo_after_visibility, |param| param. span ( ) . hi ( ) ) ;
2273
2272
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 {
131
131
} ;
132
132
let ty_hi = if let ast:: GenericParamKind :: Type {
133
133
default : Some ( ref ty) ,
134
- } = self . kind
134
+ }
135
+ | ast:: GenericParamKind :: Const { ref ty, .. } = self . kind
135
136
{
136
137
ty. span ( ) . hi ( )
137
138
} 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