Rollup merge of #106960 - estebank:parse-anon-enums, r=cjgillot
Teach parser to understand fake anonymous enum syntax Parse `Ty | OtherTy` in function argument and return types. Parse type ascription in top level patterns. Minimally address #100741.
This commit is contained in:
commit
ba928ba041
9 changed files with 266 additions and 47 deletions
|
@ -400,8 +400,8 @@ pub fn walk_ty<'a, V: Visitor<'a>>(visitor: &mut V, typ: &'a Ty) {
|
|||
walk_list!(visitor, visit_lifetime, opt_lifetime, LifetimeCtxt::Ref);
|
||||
visitor.visit_ty(&mutable_type.ty)
|
||||
}
|
||||
TyKind::Tup(tuple_element_types) => {
|
||||
walk_list!(visitor, visit_ty, tuple_element_types);
|
||||
TyKind::Tup(tys) => {
|
||||
walk_list!(visitor, visit_ty, tys);
|
||||
}
|
||||
TyKind::BareFn(function_declaration) => {
|
||||
walk_list!(visitor, visit_generic_param, &function_declaration.generic_params);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue