diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-31 11:18:53 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-31 11:18:53 +0100 |
commit | 683d0a4d93c29c988c40c001a4b574d8f0dcb9c6 (patch) | |
tree | 1d5bb4ce799c6377b49ae73436d50a087db53392 /xtask/src/codegen/gen_syntax.rs | |
parent | 6b7cb8b5ab539fc4333ce34bc29bf77c976f232a (diff) | |
parent | 08ea2271e8050165d0aaf4c994ed3dd746aff3ba (diff) |
Merge #5618
5618: Rename TypeRef -> Type r=matklad a=matklad
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.
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src/codegen/gen_syntax.rs')
-rw-r--r-- | xtask/src/codegen/gen_syntax.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 45b788bdb..d6a72ccc0 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs | |||
@@ -476,7 +476,13 @@ impl Field { | |||
476 | }; | 476 | }; |
477 | format_ident!("{}_token", name) | 477 | format_ident!("{}_token", name) |
478 | } | 478 | } |
479 | Field::Node { name, .. } => format_ident!("{}", name), | 479 | Field::Node { name, .. } => { |
480 | if name == "type" { | ||
481 | format_ident!("ty") | ||
482 | } else { | ||
483 | format_ident!("{}", name) | ||
484 | } | ||
485 | } | ||
480 | } | 486 | } |
481 | } | 487 | } |
482 | fn ty(&self) -> proc_macro2::Ident { | 488 | fn ty(&self) -> proc_macro2::Ident { |