diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-24 01:18:58 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-24 01:18:58 +0000 |
commit | 3ab8d7a9ae1b8c5e421a4666f6693ae7278a7a3c (patch) | |
tree | f1ce0582f85b1612e369681dc981df7ec575ae9a /crates/parser | |
parent | a7a1bb444d59732e3973b7b2d5b27413c5a1ca81 (diff) | |
parent | 70d43c3faf6cc4e6fe4833c6375d05e54874ca0d (diff) |
Merge #7414
7414: Add validation for mutable const items r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/parser')
-rw-r--r-- | crates/parser/src/grammar/items/consts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
13 | fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { | 13 | fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { |
14 | assert!(p.at(kw)); | 14 | assert!(p.at(kw)); |
15 | p.bump(kw); | 15 | p.bump(kw); |
16 | p.eat(T![mut]); // FIXME: validator to forbid const mut | 16 | p.eat(T![mut]); |
17 | 17 | ||
18 | // Allow `_` in place of an identifier in a `const`. | 18 | // Allow `_` in place of an identifier in a `const`. |
19 | let is_const_underscore = kw == T![const] && p.eat(T![_]); | 19 | let is_const_underscore = kw == T![const] && p.eat(T![_]); |