diff options
| author | bors <bors@rust-lang.org> | 2024-07-27 18:29:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-27 18:29:13 +0000 |
| commit | fbccf50533b1f287edccb1fc0dd847cd78a1a27e (patch) | |
| tree | b1a462aa09b0b4a5190ea4f6534d65958a532c2c /compiler/rustc_parse/src | |
| parent | d9e1dea75e0f57d489068460ef32127e291a07c4 (diff) | |
| parent | f62ae7e120438a5802c50bab84bcf983a7014bb7 (diff) | |
| download | rust-fbccf50533b1f287edccb1fc0dd847cd78a1a27e.tar.gz rust-fbccf50533b1f287edccb1fc0dd847cd78a1a27e.zip | |
Auto merge of #128278 - tgross35:rollup-zv7q0h5, r=tgross35
Rollup of 8 pull requests Successful merges: - #125897 (from_ref, from_mut: clarify documentation) - #128207 (improve error message when `global_asm!` uses `asm!` options) - #128241 (Remove logic to suggest clone of function output) - #128259 ([illumos/solaris] set MSG_NOSIGNAL while writing to sockets) - #128262 (Delete `SimplifyArmIdentity` and `SimplifyBranchSame` tests) - #128266 (update `rust.channel` default value documentation) - #128267 (Add rustdoc GUI test to check title with and without search) - #128271 (Disable jump threading of float equality) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 7326b9ec51f..e7240869a39 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -599,7 +599,7 @@ impl<'a> Parser<'a> { /// If the next token is the given keyword, eats it and returns `true`. /// Otherwise, returns `false`. An expectation is also added for diagnostics purposes. - // Public for rustfmt usage. + // Public for rustc_builtin_macros and rustfmt usage. #[inline] pub fn eat_keyword(&mut self, kw: Symbol) -> bool { if self.check_keyword(kw) { @@ -631,8 +631,11 @@ impl<'a> Parser<'a> { false } + /// If the next token is the given keyword, eats it and returns `true`. + /// Otherwise, returns `false`. No expectation is added. + // Public for rustc_builtin_macros usage. #[inline] - fn eat_keyword_noexpect(&mut self, kw: Symbol) -> bool { + pub fn eat_keyword_noexpect(&mut self, kw: Symbol) -> bool { if self.token.is_keyword(kw) { self.bump(); true |
