Rollup merge of #89046 - oli-obk:fix_oflo, r=estebank
"Fix" an overflow in byte position math r? `@estebank` help! I fixed the ICE only to brick the diagnostic. I mean, it was wrong previously (using an already expanded macro span), but it is really bad now XD
This commit is contained in:
commit
5948a7b407
6 changed files with 37 additions and 10 deletions
|
@ -6,6 +6,9 @@
|
|||
#![feature(box_patterns)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::token::{self, Nonterminal, Token, TokenKind};
|
||||
use rustc_ast::tokenstream::{self, AttributesData, CanSynthesizeMissingTokens, LazyTokenStream};
|
||||
|
|
|
@ -1084,6 +1084,7 @@ impl<'a> Parser<'a> {
|
|||
|
||||
/// If we encounter a parser state that looks like the user has written a `struct` literal with
|
||||
/// parentheses instead of braces, recover the parser state and provide suggestions.
|
||||
#[instrument(skip(self, seq, snapshot), level = "trace")]
|
||||
fn maybe_recover_struct_lit_bad_delims(
|
||||
&mut self,
|
||||
lo: Span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue