1
Fork 0

Use AttrVec for Arm, FieldDef, and Variant

This commit is contained in:
Yuki Okushi 2021-06-17 07:11:13 +09:00
parent 9fef8d91b4
commit 4f8e0ebcc5
No known key found for this signature in database
GPG key ID: DABA5B072961C18A
7 changed files with 16 additions and 16 deletions

View file

@ -1017,7 +1017,7 @@ pub struct Local {
/// ```
#[derive(Clone, Encodable, Decodable, Debug)]
pub struct Arm {
pub attrs: Vec<Attribute>,
pub attrs: AttrVec,
/// Match arm pattern, e.g. `10` in `match foo { 10 => {}, _ => {} }`
pub pat: P<Pat>,
/// Match arm guard, e.g. `n > 10` in `match foo { n if n > 10 => {}, _ => {} }`
@ -2293,7 +2293,7 @@ pub struct EnumDef {
#[derive(Clone, Encodable, Decodable, Debug)]
pub struct Variant {
/// Attributes of the variant.
pub attrs: Vec<Attribute>,
pub attrs: AttrVec,
/// Id of the variant (not the constructor, see `VariantData::ctor_id()`).
pub id: NodeId,
/// Span
@ -2474,7 +2474,7 @@ impl VisibilityKind {
/// E.g., `bar: usize` as in `struct Foo { bar: usize }`.
#[derive(Clone, Encodable, Decodable, Debug)]
pub struct FieldDef {
pub attrs: Vec<Attribute>,
pub attrs: AttrVec,
pub id: NodeId,
pub span: Span,
pub vis: Visibility,