about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-05-30 10:53:03 +0200
committerGitHub <noreply@github.com>2019-05-30 10:53:03 +0200
commitbc3f373cbb31174ab9956ea9de4b67a56065651d (patch)
treeb8234e9642f2ffcc06021fe45dcd1dc20d8cc65a /src/test/ui/thinlto
parent8cb5885adc2bab77e4dcbcf86f99ae4efa26a1f6 (diff)
parent5d72ac36393cace0ef7845c39cc46a9555dfdcb8 (diff)
downloadrust-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