Rename TypeRef -> Type

The TypeRef name comes from IntelliJ days, where you often have both
type *syntax* as well as *semantical* representation of types in
scope. And naming both Type is confusing.

In rust-analyzer however, we use ast types as `ast::Type`, and have
many more semantic counterparts to ast types, so avoiding name clash
here is just confusing.
This commit is contained in:
Aleksey Kladov 2020-07-31 12:06:38 +02:00
parent e0f21133cd
commit 08ea2271e8
19 changed files with 209 additions and 203 deletions

View file

@ -476,7 +476,13 @@ impl Field {
};
format_ident!("{}_token", name)
}
Field::Node { name, .. } => format_ident!("{}", name),
Field::Node { name, .. } => {
if name == "type" {
format_ident!("ty")
} else {
format_ident!("{}", name)
}
}
}
}
fn ty(&self) -> proc_macro2::Ident {