File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1184,8 +1184,10 @@ impl<'a> Parser<'a> {
1184
1184
match ate {
1185
1185
Some ( _) => {
1186
1186
// See doc comment for `unmatched_angle_bracket_count`.
1187
- self . unmatched_angle_bracket_count -= 1 ;
1188
- debug ! ( "expect_gt: (decrement) count={:?}" , self . unmatched_angle_bracket_count) ;
1187
+ if self . unmatched_angle_bracket_count > 0 {
1188
+ self . unmatched_angle_bracket_count -= 1 ;
1189
+ debug ! ( "expect_gt: (decrement) count={:?}" , self . unmatched_angle_bracket_count) ;
1190
+ }
1189
1191
1190
1192
Ok ( ( ) )
1191
1193
} ,
@@ -2248,8 +2250,10 @@ impl<'a> Parser<'a> {
2248
2250
2249
2251
// See doc comment for `unmatched_angle_bracket_count`.
2250
2252
self . expect ( & token:: Gt ) ?;
2251
- self . unmatched_angle_bracket_count -= 1 ;
2252
- debug ! ( "parse_qpath: (decrement) count={:?}" , self . unmatched_angle_bracket_count) ;
2253
+ if self . unmatched_angle_bracket_count > 0 {
2254
+ self . unmatched_angle_bracket_count -= 1 ;
2255
+ debug ! ( "parse_qpath: (decrement) count={:?}" , self . unmatched_angle_bracket_count) ;
2256
+ }
2253
2257
2254
2258
self . expect ( & token:: ModSep ) ?;
2255
2259
You can’t perform that action at this time.
0 commit comments