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 @@ -2217,11 +2217,10 @@ fn rewrite_fn_base(
2217
2217
2218
2218
// Skip `pub(crate)`.
2219
2219
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
2221
2221
let params_start = fn_sig
2222
2222
. generics
2223
2223
. params
2224
- . iter ( )
2225
2224
. last ( )
2226
2225
. map_or ( lo_after_visibility, |param| param. span ( ) . hi ( ) ) ;
2227
2226
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 {
132
132
} ;
133
133
let ty_hi = if let ast:: GenericParamKind :: Type {
134
134
default : Some ( ref ty) ,
135
- } = self . kind
135
+ }
136
+ | ast:: GenericParamKind :: Const { ref ty, .. } = self . kind
136
137
{
137
138
ty. span ( ) . hi ( )
138
139
} 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