diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2021-02-02 12:15:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-02 12:15:02 +0100 |
| commit | 255e0764c071d73a43a0c88181cb4cf667a74bff (patch) | |
| tree | c57981a97579414d5675173adc20c6fd8c5e6866 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | 86d0e6d257d8546b07417b863ef2f5d62bf7ce19 (diff) | |
| parent | 6c14aad58e65c9c50faa45ed88369c5c72d6d0d7 (diff) | |
| download | rust-255e0764c071d73a43a0c88181cb4cf667a74bff.tar.gz rust-255e0764c071d73a43a0c88181cb4cf667a74bff.zip | |
Rollup merge of #81608 - Aaron1011:macro-res-parse-err, r=davidtwco
Improve handling of spans around macro result parse errors Fixes #81543 After we expand a macro, we try to parse the resulting tokens as a AST node. This commit makes several improvements to how we handle spans when an error occurs: * Only ovewrite the original `Span` if it's a dummy span. This preserves a more-specific span if one is available. * Use `self.prev_token` instead of `self.token` when emitting an error message after encountering EOF, since an EOF token always has a dummy span * Make `SourceMap::next_point` leave dummy spans unused. A dummy span does not have a logical 'next point', since it's a zero-length span. Re-using the span span preserves its 'dummy-ness' for other checks
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions
