summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorthe8472 <the8472@users.noreply.github.com>2021-09-22 19:03:22 +0200
committerGitHub <noreply@github.com>2021-09-22 19:03:22 +0200
commit5948a7b40799d0c0ab4dd171375a335402686ff6 (patch)
treed9de0161d54c1f87a2d3493d09729c15d926fd4e /compiler/rustc_parse/src/parser
parent1deef1f75d0761256578508c1b398718e121d094 (diff)
parentc9fe0938767c8803330367806db8ba1ce81c7843 (diff)
downloadrust-5948a7b40799d0c0ab4dd171375a335402686ff6.tar.gz
rust-5948a7b40799d0c0ab4dd171375a335402686ff6.zip
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
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index c62ea66b693..fe0468c6956 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -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,