We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dd0bb6 commit d641cb8Copy full SHA for d641cb8
compiler/rustc_parse/src/parser/mod.rs
@@ -548,7 +548,11 @@ impl<'a> Parser<'a> {
548
549
fn check_inline_const(&mut self) -> bool {
550
self.check_keyword(kw::Const)
551
- && self.look_ahead(1, |t| t == &token::OpenDelim(DelimToken::Brace))
+ && self.look_ahead(1, |t| match t.kind {
552
+ token::Interpolated(ref nt) => matches!(**nt, token::NtBlock(..)),
553
+ token::OpenDelim(DelimToken::Brace) => true,
554
+ _ => false,
555
+ })
556
}
557
558
/// Checks to see if the next token is either `+` or `+=`.
0 commit comments