diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-05-30 10:53:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-30 10:53:03 +0200 |
| commit | bc3f373cbb31174ab9956ea9de4b67a56065651d (patch) | |
| tree | b8234e9642f2ffcc06021fe45dcd1dc20d8cc65a /src/test/ui/thinlto | |
| parent | 8cb5885adc2bab77e4dcbcf86f99ae4efa26a1f6 (diff) | |
| parent | 5d72ac36393cace0ef7845c39cc46a9555dfdcb8 (diff) | |
| download | rust-bc3f373cbb31174ab9956ea9de4b67a56065651d.tar.gz rust-bc3f373cbb31174ab9956ea9de4b67a56065651d.zip | |
Rollup merge of #61321 - Centril:is_keyword_ahead, r=petrochenkov
libsyntax: introduce 'fn is_keyword_ahead(dist, keywords)'.
Introduces:
```rust
/// 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 {
self.look_ahead(dist, |t| kws.iter().any(|&kw| t.is_keyword(kw)))
}
```
r? @oli-obk
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions
