about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorkadmin <julianknodt@gmail.com>2022-01-13 07:39:58 +0000
committerkadmin <julianknodt@gmail.com>2022-01-17 20:01:22 +0000
commit1c1ce2fbda9c5d385fcb222d98d948aa4616fe91 (patch)
treecd857aabfa5104ae08da5c00114dbe6cddb765c2 /compiler/rustc_parse/src/parser
parentf396888c4d816f7d0980aba041014169dd71a2a7 (diff)
downloadrust-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.rs5
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")