Teach parser to understand fake anonymous enum syntax
Parse `-> Ty | OtherTy`. Parse type ascription in top level patterns.
This commit is contained in:
parent
19c2286d5c
commit
2791cc37e6
@ -839,7 +839,9 @@ impl Rewrite for ast::Ty {
|
||||
})
|
||||
}
|
||||
ast::TyKind::CVarArgs => Some("...".to_owned()),
|
||||
ast::TyKind::Err => Some(context.snippet(self.span).to_owned()),
|
||||
ast::TyKind::AnonEnum(_) | ast::TyKind::Err => {
|
||||
Some(context.snippet(self.span).to_owned())
|
||||
}
|
||||
ast::TyKind::Typeof(ref anon_const) => rewrite_call(
|
||||
context,
|
||||
"typeof",
|
||||
|
Loading…
x
Reference in New Issue
Block a user