1
Fork 0

Parse negative literals in const generic arguments

This commit is contained in:
varkor 2019-02-07 14:58:47 +01:00
parent 9ad04b9960
commit 451f128783
2 changed files with 5 additions and 2 deletions

View file

@ -5796,8 +5796,7 @@ impl<'a> Parser<'a> {
} else {
// FIXME(const_generics): this currently conflicts with emplacement syntax
// with negative integer literals.
let lit = self.parse_lit()?;
self.mk_expr(lit.span, ExprKind::Lit(lit), ThinVec::new())
self.parse_literal_maybe_minus()?
};
let value = AnonConst {
id: ast::DUMMY_NODE_ID,