diff options
| author | sjwang05 <63834813+sjwang05@users.noreply.github.com> | 2023-11-10 12:13:53 -0800 |
|---|---|---|
| committer | sjwang05 <63834813+sjwang05@users.noreply.github.com> | 2023-11-10 12:13:53 -0800 |
| commit | a49368f00b66409ae9fcf42d52e4f8246c73c266 (patch) | |
| tree | f8beed04dd8913947502276fa91bbf726fd8ac64 /compiler/rustc_parse/src/parser/mod.rs | |
| parent | 9455259450f0186df991a14d960bb3759e7eac43 (diff) | |
| download | rust-a49368f00b66409ae9fcf42d52e4f8246c73c266.tar.gz rust-a49368f00b66409ae9fcf42d52e4f8246c73c266.zip | |
Correctly handle while-let-chains
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 2 |
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..6eab140117e 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 fn is_keyword_ahead(&self, dist: usize, kws: &[Symbol]) -> bool { self.look_ahead(dist, |t| kws.iter().any(|&kw| t.is_keyword(kw))) } |
