rust/compiler/rustc_ast/src
Aaron Hill fb5fec017b
Combine HasAttrs and HasTokens into AstLike
When token-based attribute handling is implemeneted in #80689,
we will need to access tokens from `HasAttrs` (to perform
cfg-stripping), and we will to access attributes from `HasTokens` (to
construct a `PreexpTokenStream`).

This PR merges the `HasAttrs` and `HasTokens` traits into a new
`AstLike` trait. The previous `HasAttrs` impls from `Vec<Attribute>` and `AttrVec`
are removed - they aren't attribute targets, so the impls never really
made sense.
2021-02-27 00:14:13 -05:00
..
ast mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
attr Combine HasAttrs and HasTokens into AstLike 2021-02-27 00:14:13 -05:00
expand mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
util Remove unnecessary manual shrink_to_fit calls 2021-01-16 14:02:36 +01:00
ast.rs Combine HasAttrs and HasTokens into AstLike 2021-02-27 00:14:13 -05:00
ast_like.rs Combine HasAttrs and HasTokens into AstLike 2021-02-27 00:14:13 -05:00
crate_disambiguator.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
entry.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
lib.rs Combine HasAttrs and HasTokens into AstLike 2021-02-27 00:14:13 -05:00
mut_visit.rs ast: Keep expansion status for out-of-line module items 2021-02-18 13:07:49 +03:00
node_id.rs Clarify docs for DUMMY_NODE_ID 2021-02-07 19:42:12 -08:00
ptr.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
token.rs rustc_parse: Better spans for synthesized token streams 2021-01-07 17:48:13 +03:00
tokenstream.rs Refactor token collection to capture trailing token immediately 2021-01-22 00:33:03 -05:00
visit.rs ast: Keep expansion status for out-of-line module items 2021-02-18 13:07:49 +03:00