rust/compiler/rustc_parse/src/parser
bors 803c60218f 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.
2020-12-13 19:31:06 +00:00
..
attr.rs rustc_parse: restore pub vis on parse_attribute 2020-11-26 12:54:09 -06:00
diagnostics.rs Permit standalone generic parameters as const generic arguments in macros 2020-11-18 13:16:35 +00:00
expr.rs Update error to reflect that integer literals can have float suffixes 2020-11-27 19:08:24 -08:00
generics.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
item.rs Recover on const impl<> X for Y 2020-12-12 14:45:54 -06:00
mod.rs Properly capture trailing 'unglued' token 2020-12-12 16:28:13 -05:00
nonterminal.rs Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
pat.rs Fixes #79357 unstable or-pat suggestions 2020-11-29 15:31:45 -03:00
path.rs Auto merge of #79266 - b-naber:gat_trait_path_parser, r=petrochenkov 2020-11-27 00:18:24 +00:00
stmt.rs Only eat semicolons for statements that need them 2020-11-26 17:08:35 -05:00
ty.rs Tweak invalid fn header and body parsing 2020-10-25 18:34:14 -07:00