mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
319735d8c9
There was an inconsistency where in the case of array repeat expressions, we forgot to eat the `const` keyword of mgca const blocks. Thus, we ended up parsing them as an anon const containing an inline const, instead of simply an anon const as they should be. This commit fixes that issue and also makes the parsing for mgca const blocks more consistent and simpler in general. For example, we avoid doing a lookahead check to ensure there's a curly brace coming. There should always be one after a `const` keyword in an expression context, and that's handled by the mgca const block parsing function.