about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-13 01:57:59 +0000
committerbors <bors@rust-lang.org>2023-11-13 01:57:59 +0000
commitea1e5cc91f413224741011cbd3c2ed380d3d3129 (patch)
tree398615627ae5f1454dda4a3b63ffcc689218012a /compiler/rustc_parse/src/parser
parent0828c159c58b2623d7750843a11f7bbd5e94ccb7 (diff)
parent274824b917c290d6ac9227e1c263a3358ba6e6f2 (diff)
downloadrust-ea1e5cc91f413224741011cbd3c2ed380d3d3129.tar.gz
rust-ea1e5cc91f413224741011cbd3c2ed380d3d3129.zip
Auto merge of #117770 - sjwang05:issue-117766, r=estebank,TaKO8Ki
Catch stray `{` in let-chains

Fixes #117766
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index 1a7ae406911..76f3f21a516 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -1115,7 +1115,7 @@ impl<'a> Parser<'a> {
     }
 
     /// Returns whether any of the given keywords are `dist` tokens ahead of the current one.
-    fn is_keyword_ahead(&self, dist: usize, kws: &[Symbol]) -> bool {
+    pub(crate) fn is_keyword_ahead(&self, dist: usize, kws: &[Symbol]) -> bool {
         self.look_ahead(dist, |t| kws.iter().any(|&kw| t.is_keyword(kw)))
     }