diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2018-10-05 22:33:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-05 22:33:17 +0200 |
| commit | a95a6e287a9ea2665e6e1a230cf6acaeb1bbe9d1 (patch) | |
| tree | 6fc17abed4c52dd300c415ea77154bb16d079755 /src/rustllvm/RustWrapper.cpp | |
| parent | 08af25fb27a521ee924787c10c96e8d9e2b04db9 (diff) | |
| parent | 9da428dad8eefa8a821214bc0fe0d4159ba4efed (diff) | |
| download | rust-a95a6e287a9ea2665e6e1a230cf6acaeb1bbe9d1.tar.gz rust-a95a6e287a9ea2665e6e1a230cf6acaeb1bbe9d1.zip | |
Rollup merge of #54833 - abonander:issue-54441, r=petrochenkov
make `Parser::parse_foreign_item()` return a foreign item or error Fixes `Parser::parse_foreign_item()` to follow the convention of `parse_trait_item()` and `parse_impl_item()` in that it *must* parse an item or return an error, and then the caller is responsible for detecting the closing delimiter. This prevents it from looping endlessly on an unexpected token in `ext/expand.rs` where it was also leaking memory by continually pushing to `Parser::expected_tokens` via `Parser::check_keyword()`. closes #54441 r? @petrochenkov cc @dtolnay
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
