From 70d43c3faf6cc4e6fe4833c6375d05e54874ca0d Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 24 Jan 2021 02:17:41 +0100 Subject: Add validation for mutable const items --- crates/parser/src/grammar/items/consts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/parser/src') diff --git a/crates/parser/src/grammar/items/consts.rs b/crates/parser/src/grammar/items/consts.rs index eb7d1f828..12130df40 100644 --- a/crates/parser/src/grammar/items/consts.rs +++ b/crates/parser/src/grammar/items/consts.rs @@ -13,7 +13,7 @@ pub(super) fn konst(p: &mut Parser, m: Marker) { fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { assert!(p.at(kw)); p.bump(kw); - p.eat(T![mut]); // FIXME: validator to forbid const mut + p.eat(T![mut]); // Allow `_` in place of an identifier in a `const`. let is_const_underscore = kw == T![const] && p.eat(T![_]); -- cgit v1.2.3