diff options
author | Aleksey Kladov <[email protected]> | 2020-07-31 11:06:38 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-31 11:14:37 +0100 |
commit | 08ea2271e8050165d0aaf4c994ed3dd746aff3ba (patch) | |
tree | 1d5bb4ce799c6377b49ae73436d50a087db53392 /crates/ra_syntax/src/lib.rs | |
parent | e0f21133cd03c6160fbc97b70bbd50ccde4fe6d9 (diff) |
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.
Diffstat (limited to 'crates/ra_syntax/src/lib.rs')
-rw-r--r-- | crates/ra_syntax/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index 6203b6206..8a4d45386 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs | |||
@@ -194,7 +194,7 @@ impl ast::Item { | |||
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | impl ast::TypeRef { | 197 | impl ast::Type { |
198 | /// Returns `text`, parsed as an type reference, but only if it has no errors. | 198 | /// Returns `text`, parsed as an type reference, but only if it has no errors. |
199 | pub fn parse(text: &str) -> Result<Self, ()> { | 199 | pub fn parse(text: &str) -> Result<Self, ()> { |
200 | parsing::parse_text_fragment(text, ra_parser::FragmentKind::Type) | 200 | parsing::parse_text_fragment(text, ra_parser::FragmentKind::Type) |