diff options
| author | bors <bors@rust-lang.org> | 2023-07-30 05:52:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-30 05:52:12 +0000 |
| commit | 2183cdac191e8e6c2663db055c8ed529ec60052c (patch) | |
| tree | 19ce6a78de546337bb7bc803452b52f6ef99090b /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 70757fbdd76565563a2311db393459899a38b40f (diff) | |
| parent | a4bfcbe4d3f2a1080a70c15c1f681b9f341c882e (diff) | |
| download | rust-2183cdac191e8e6c2663db055c8ed529ec60052c.tar.gz rust-2183cdac191e8e6c2663db055c8ed529ec60052c.zip | |
Auto merge of #2996 - rust-lang:rustup-2023-07-30, r=oli-obk
Automatic sync 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. |
