diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-29 09:14:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-29 09:14:59 +0200 |
| commit | a4e92bfef003a5760602260bbd5e0273e4aef1a4 (patch) | |
| tree | cd857df68f33e421d1a94288c466bbe477e085b2 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 367a80ce9e39d1403a0248e9ac205217b943d236 (diff) | |
| parent | 3bc32472008387ab2adca98dcfd0bef6207357c1 (diff) | |
| download | rust-a4e92bfef003a5760602260bbd5e0273e4aef1a4.tar.gz rust-a4e92bfef003a5760602260bbd5e0273e4aef1a4.zip | |
Rollup merge of #127103 - compiler-errors:tighten-trait-bound-parsing, r=fmease
Move binder and polarity parsing into `parse_generic_ty_bound` Let's pull out the parts of #127054 which just: 1. Make the parsing code less confusing 2. Fix `?use<>` (to correctly be denied) 3. Improve `T: for<'a> 'a` diagnostics This should have no user-facing effects on stable parsing. r? fmease
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 3cdc20b6c65..b2df9a14eb0 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2327,7 +2327,7 @@ impl<'a> Parser<'a> { let before = self.prev_token.clone(); let binder = if self.check_keyword(kw::For) { let lo = self.token.span; - let lifetime_defs = self.parse_late_bound_lifetime_defs()?; + let (lifetime_defs, _) = self.parse_late_bound_lifetime_defs()?; let span = lo.to(self.prev_token.span); self.psess.gated_spans.gate(sym::closure_lifetime_binder, span); |
