diff options
| author | bors <bors@rust-lang.org> | 2023-02-03 17:53:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-03 17:53:49 +0000 |
| commit | 658fad6c5506f41c35b64fb1a22ceb0992697ff3 (patch) | |
| tree | d9beffb3e496848ea5acbe6d9caf2d102f473eab /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 9545094994f1ab45cab5799d5b45980871a9e97b (diff) | |
| parent | c9270272df5bd7254b6ce1c7b69d41c75e443406 (diff) | |
| download | rust-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.rs | 2 |
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 |
