rust/compiler/rustc_parse/src/parser
bors ffa2e7ae8f Auto merge of #77255 - Aaron1011:feature/collect-attr-tokens, r=petrochenkov
Unconditionally capture tokens for attributes.

This allows us to avoid synthesizing tokens in `prepend_attr`, since we
have the original tokens available.

We still need to synthesize tokens when expanding `cfg_attr`,
but this is an unavoidable consequence of the syntax of `cfg_attr` -
the user does not supply the `#` and `[]` tokens that a `cfg_attr`
expands to.

This is based on PR https://github.com/rust-lang/rust/pull/77250 - this PR exposes a bug in the current `collect_tokens` implementation, which is fixed by the rewrite.
2020-10-24 19:23:32 +00:00
..
attr.rs Only call collect_tokens when we have an attribute to parse 2020-10-22 15:17:40 -04:00
diagnostics.rs Detect blocks that could be struct expr bodies 2020-10-07 13:40:52 -07:00
expr.rs Auto merge of #77255 - Aaron1011:feature/collect-attr-tokens, r=petrochenkov 2020-10-24 19:23:32 +00:00
generics.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
item.rs Don't create an empty LazyTokenStream 2020-10-22 10:09:08 -04:00
mod.rs Auto merge of #77255 - Aaron1011:feature/collect-attr-tokens, r=petrochenkov 2020-10-24 19:23:32 +00:00
nonterminal.rs Don't create an empty LazyTokenStream 2020-10-22 10:09:08 -04:00
pat.rs Make inline const work for half open ranges 2020-10-22 13:22:12 -03:00
path.rs Attach TokenStream to ast::Path 2020-09-10 17:33:06 -04:00
stmt.rs Detect blocks that could be struct expr bodies 2020-10-07 13:40:52 -07:00
ty.rs fix typo in docs and comments 2020-09-21 12:14:28 +09:00