Implement Anonymous{Struct, Union} in the AST

Add unnamed_fields feature gate and gate unnamed fields on parsing
This commit is contained in:
jedel1043 2021-05-16 09:49:16 -05:00
parent 8cf990c9b5
commit 059b68dd67
13 changed files with 232 additions and 31 deletions

View file

@ -1861,6 +1861,10 @@ pub enum TyKind {
Never,
/// A tuple (`(A, B, C, D,...)`).
Tup(Vec<P<Ty>>),
/// An anonymous struct type i.e. `struct { foo: Type }`
AnonymousStruct(Vec<FieldDef>, bool),
/// An anonymous union type i.e. `union { bar: Type }`
AnonymousUnion(Vec<FieldDef>, bool),
/// A path (`module::module::...::Type`), optionally
/// "qualified", e.g., `<Vec<T> as SomeTrait>::SomeType`.
///