about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-13 19:31:06 +0000
committerbors <bors@rust-lang.org>2020-12-13 19:31:06 +0000
commit803c60218ffac3384b0063c1b87ae7944163bba7 (patch)
treeff216a1bb6dc284ee611d6236fbcc03ec5820a56 /compiler/rustc_codegen_llvm/src/lib.rs
parent69ff39ee32ce73e407725cbd90cafdb23cb7ec68 (diff)
parente6fa6334dd54f7c96514b520c5b9f261df3fc16b (diff)
downloadrust-803c60218ffac3384b0063c1b87ae7944163bba7.tar.gz
rust-803c60218ffac3384b0063c1b87ae7944163bba7.zip
Auto merge of #79978 - Aaron1011:fix/capture-broken-token, r=petrochenkov
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