]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #82448 - Aaron1011:merge-hastokens-hasattrs, r=petrochenkov
authorbors <bors@rust-lang.org>
Sat, 27 Feb 2021 07:52:11 +0000 (07:52 +0000)
committerbors <bors@rust-lang.org>
Sat, 27 Feb 2021 07:52:11 +0000 (07:52 +0000)
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.


No differences found