review comments
This commit is contained in:
@@ -7672,7 +7672,8 @@ impl<'a> Parser<'a> {
|
|||||||
&mut self.token_cursor.frame.last_token
|
&mut self.token_cursor.frame.last_token
|
||||||
} else if self.token_cursor.stack.get(prev).is_none() {
|
} else if self.token_cursor.stack.get(prev).is_none() {
|
||||||
// This can happen due to a bad interaction of two unrelated recovery mechanisms with
|
// This can happen due to a bad interaction of two unrelated recovery mechanisms with
|
||||||
// mismatched delimiters *and* recovery lookahead on `pub ident(` likely typo (#62881)
|
// mismatched delimiters *and* recovery lookahead on the likely typo `pub ident(`
|
||||||
|
// (#62881).
|
||||||
return Ok((ret?, TokenStream::new(vec![])));
|
return Ok((ret?, TokenStream::new(vec![])));
|
||||||
} else {
|
} else {
|
||||||
&mut self.token_cursor.stack[prev].last_token
|
&mut self.token_cursor.stack[prev].last_token
|
||||||
@@ -7686,8 +7687,8 @@ impl<'a> Parser<'a> {
|
|||||||
debug!("collect_tokens: {}", msg);
|
debug!("collect_tokens: {}", msg);
|
||||||
self.sess.span_diagnostic.delay_span_bug(self.token.span, &msg);
|
self.sess.span_diagnostic.delay_span_bug(self.token.span, &msg);
|
||||||
// This can happen due to a bad interaction of two unrelated recovery mechanisms
|
// This can happen due to a bad interaction of two unrelated recovery mechanisms
|
||||||
// with mismatched delimiters *and* recovery lookahead on `pub ident(` likely typo
|
// with mismatched delimiters *and* recovery lookahead on the likely typo
|
||||||
// (#62895, different but similar to the case above)
|
// `pub ident(` (#62895, different but similar to the case above).
|
||||||
return Ok((ret?, TokenStream::new(vec![])));
|
return Ok((ret?, TokenStream::new(vec![])));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user