about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-03 17:53:49 +0000
committerbors <bors@rust-lang.org>2023-02-03 17:53:49 +0000
commit658fad6c5506f41c35b64fb1a22ceb0992697ff3 (patch)
treed9beffb3e496848ea5acbe6d9caf2d102f473eab /compiler/rustc_parse/src/parser/expr.rs
parent9545094994f1ab45cab5799d5b45980871a9e97b (diff)
parentc9270272df5bd7254b6ce1c7b69d41c75e443406 (diff)
downloadrust-658fad6c5506f41c35b64fb1a22ceb0992697ff3.tar.gz
rust-658fad6c5506f41c35b64fb1a22ceb0992697ff3.zip
Auto merge of #107642 - Dylan-DPC:rollup-edcqhm5, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #107082 (Autotrait bounds on dyn-safe trait methods)
 - #107427 (Add candidates for DiscriminantKind builtin)
 - #107539 (Emit warnings on unused parens in index expressions)
 - #107544 (Improve `TokenCursor`.)
 - #107585 (Don't cause a cycle when formatting query description that references a FnDef)
 - #107633 (Fix suggestion for coercing Option<&String> to Option<&str>)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 3d42a9dcbbe..8a6436b041b 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -2141,7 +2141,7 @@ impl<'a> Parser<'a> {
         }
 
         if self.token.kind == TokenKind::Semi
-            && matches!(self.token_cursor.frame.delim_sp, Some((Delimiter::Parenthesis, _)))
+            && matches!(self.token_cursor.stack.last(), Some((_, Delimiter::Parenthesis, _)))
             && self.may_recover()
         {
             // It is likely that the closure body is a block but where the