about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-21 11:22:17 +0000
committerbors <bors@rust-lang.org>2020-10-21 11:22:17 +0000
commit19356453cbfb734bc60a1853c10e3095d05e0342 (patch)
tree7b4db815ca111d129ecda5f620695fff51563a2e /compiler/rustc_parse/src
parentf965120ad3dbe7d4d6b90a16cc7028eb6363b983 (diff)
parentde24210ebf40b5700908d0a6613f82afe1995b52 (diff)
downloadrust-19356453cbfb734bc60a1853c10e3095d05e0342.tar.gz
rust-19356453cbfb734bc60a1853c10e3095d05e0342.zip
Auto merge of #78178 - JohnTitor:rollup-dslazzj, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #77726 (Add Pin::static_ref, static_mut.)
 - #78002 (Tweak "object unsafe" errors)
 - #78056 (BTreeMap: split off most code of remove and split_off)
 - #78063 (Improve wording of "cannot multiply" type error)
 - #78094 (rustdoc: Show the correct source filename in page titles, without `.html`)
 - #78101 (fix static_ptr_ty for foreign statics)
 - #78118 (Inline const followups)

Failed merges:

r? `@ghost`
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index 1860f1238c4..5176db82d3b 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -548,7 +548,11 @@ impl<'a> Parser<'a> {
 
     fn check_inline_const(&mut self) -> bool {
         self.check_keyword(kw::Const)
-            && self.look_ahead(1, |t| t == &token::OpenDelim(DelimToken::Brace))
+            && self.look_ahead(1, |t| match t.kind {
+                token::Interpolated(ref nt) => matches!(**nt, token::NtBlock(..)),
+                token::OpenDelim(DelimToken::Brace) => true,
+                _ => false,
+            })
     }
 
     /// Checks to see if the next token is either `+` or `+=`.