diff options
| author | kadmin <julianknodt@gmail.com> | 2022-01-13 07:39:58 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2022-01-17 20:01:22 +0000 |
| commit | 1c1ce2fbda9c5d385fcb222d98d948aa4616fe91 (patch) | |
| tree | cd857aabfa5104ae08da5c00114dbe6cddb765c2 /compiler/rustc_parse/src/parser | |
| parent | f396888c4d816f7d0980aba041014169dd71a2a7 (diff) | |
| download | rust-1c1ce2fbda9c5d385fcb222d98d948aa4616fe91.tar.gz rust-1c1ce2fbda9c5d385fcb222d98d948aa4616fe91.zip | |
Add term to ExistentialProjection
Also prevent ICE when adding a const in associated const equality.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 531cac1f57e..4e60b7593c6 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -505,7 +505,10 @@ impl<'a> Parser<'a> { let span = ident.span.to(self.prev_token.span); let term = match arg { Some(GenericArg::Type(ty)) => ty.into(), - Some(GenericArg::Const(c)) => c.into(), + Some(GenericArg::Const(c)) => { + self.sess.gated_spans.gate(sym::associated_const_equality, span); + c.into() + } Some(GenericArg::Lifetime(lt)) => { self.struct_span_err(span, "associated lifetimes are not supported") .span_label(lt.ident.span, "the lifetime is given here") |
