File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 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> {
11841184 match ate {
11851185 Some ( _) => {
11861186 // 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+ }
11891191
11901192 Ok ( ( ) )
11911193 } ,
@@ -2248,8 +2250,10 @@ impl<'a> Parser<'a> {
22482250
22492251 // See doc comment for `unmatched_angle_bracket_count`.
22502252 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+ }
22532257
22542258 self . expect ( & token:: ModSep ) ?;
22552259
You can’t perform that action at this time.
0 commit comments