diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-12-12 15:20:22 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-12-12 16:28:13 -0500 |
| commit | e6fa6334dd54f7c96514b520c5b9f261df3fc16b (patch) | |
| tree | 8561fd33a725cedad047218ea2741deaff324a04 /compiler/rustc_codegen_llvm/src/lib.rs | |
| parent | 388eb24b6c479088a83c1b094d79221a32dfc7ff (diff) | |
| download | rust-e6fa6334dd54f7c96514b520c5b9f261df3fc16b.tar.gz rust-e6fa6334dd54f7c96514b520c5b9f261df3fc16b.zip | |
Properly capture trailing 'unglued' token
If we try to capture the `Vec<u8>` in `Option<Vec<u8>>`, we'll need to capture a `>` token which was 'unglued' from a `>>` token. The processing of unglueing a token for parsing purposes bypasses the usual capturing infrastructure, so we currently lose the trailing `>`. As a result, we fall back to the reparsed `TokenStream`, causing us to lose spans. This commit makes token capturing keep track of a trailing 'unglued' token. Note that we don't need to care about unglueing except at the end of the captured tokens - if we capture both the first and second unglued tokens, then we'll end up capturing the full 'glued' token, which already works correctly.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
0 files changed, 0 insertions, 0 deletions
