You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
visit_struct_def
visit_enum_def
visit_generics
visit_arm (can use span of inner Expr, but it's bad)
+ maybe
visit_trait_ref (can use span of inner Path, acceptable)
visit_ty_param_bound (can use span of inner Lifetime or PolyTraitRef, acceptable)
visit_lifetime_def (can use span of inner Lifetime, acceptable)
So, if I want to visit, for example, a StructDef and report an error, I can't do it and have to visit all its parents instead.
The text was updated successfully, but these errors were encountered:
This patch uses the same data structures for structs and enum variants in AST and HIR. These changes in data structures lead to noticeable simplification in most of code dealing with them.
I didn't touch the top level, i.e. `ItemStruct` is still `ItemStruct` and not `ItemEnum` with one variant, like in the type checker.
As part of this patch, structures and variants get the `kind` field making distinction between "normal" structs, tuple structs and unit structs explicit instead of relying on the number of fields and presence of constructor `NodeId`. In particular, we can now distinguish empty tuple structs from unit structs, which was impossible before! Comprehensive tests for empty structs are added and some improvements to empty struct feature gates are made. Some tests don't pass due to issue #28692 , they are still there for completeness, but are commented out.
This patch fixes issue mentioned in #16819 (comment), now emptiness of tuple structs is checked after expansion.
It also touches #28750 by providing span for visit_struct_def
cc #28336
r? @nrc
Namely:
+ maybe
So, if I want to visit, for example, a
StructDef
and report an error, I can't do it and have to visit all its parents instead.The text was updated successfully, but these errors were encountered: