Add term to ExistentialProjection
Also prevent ICE when adding a const in associated const equality.
This commit is contained in:
parent
f396888c4d
commit
1c1ce2fbda
35 changed files with 213 additions and 71 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue