diff options
| author | The Miri Conjob Bot <miri@cron.bot> | 2023-07-30 05:43:01 +0000 |
|---|---|---|
| committer | The Miri Conjob Bot <miri@cron.bot> | 2023-07-30 05:43:01 +0000 |
| commit | 16816aa8590dca2759d7b86c7dd6c41f060be98c (patch) | |
| tree | b1d951635115e2fadd209b9450e76bb7afbf1af6 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 8ddc72eca4bbb6412639cd52db5d51b9840f3011 (diff) | |
| parent | dce7e87b1646fd5f4f7908fcd0aa1060c5189d44 (diff) | |
| download | rust-16816aa8590dca2759d7b86c7dd6c41f060be98c.tar.gz rust-16816aa8590dca2759d7b86c7dd6c41f060be98c.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index b54cb8c5a0c..0e19a67a841 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2338,7 +2338,7 @@ impl<'a> Parser<'a> { let lo = self.token.span; let attrs = self.parse_outer_attributes()?; self.collect_tokens_trailing_token(attrs, ForceCollect::No, |this, attrs| { - let pat = this.parse_pat_no_top_alt(Some(Expected::ParameterName))?; + let pat = this.parse_pat_no_top_alt(Some(Expected::ParameterName), None)?; let ty = if this.eat(&token::Colon) { this.parse_ty()? } else { @@ -2781,7 +2781,7 @@ impl<'a> Parser<'a> { return None; } let pre_pat_snapshot = self.create_snapshot_for_diagnostic(); - match self.parse_pat_no_top_alt(None) { + match self.parse_pat_no_top_alt(None, None) { Ok(_pat) => { if self.token.kind == token::FatArrow { // Reached arm end. |
