File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -808,14 +808,6 @@ where
808
808
return parse_error ( ParseErrorType :: ExprLparStart , SrcSpan { start, end : start } ) ;
809
809
}
810
810
811
- // Helpful error when trying to define a constant inside a function.
812
- Some ( ( start, Token :: Const , end) ) => {
813
- return parse_error (
814
- ParseErrorType :: ConstantInsideFunction ,
815
- SrcSpan { start, end } ,
816
- ) ;
817
- }
818
-
819
811
// Boolean negation
820
812
Some ( ( start, Token :: Bang , _end) ) => {
821
813
self . advance ( ) ;
@@ -1190,6 +1182,12 @@ where
1190
1182
Ok ( Some ( self . parse_assert ( start) ?) )
1191
1183
}
1192
1184
1185
+ // Helpful error when trying to define a constant inside a function.
1186
+ Some ( ( start, Token :: Const , end) ) => parse_error (
1187
+ ParseErrorType :: ConstantInsideFunction ,
1188
+ SrcSpan { start, end } ,
1189
+ ) ,
1190
+
1193
1191
token => {
1194
1192
self . tok0 = token;
1195
1193
self . parse_statement_errors ( ) ?;
You can’t perform that action at this time.
0 commit comments