aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-31 11:06:38 +0100
committerAleksey Kladov <[email protected]>2020-07-31 11:14:37 +0100
commit08ea2271e8050165d0aaf4c994ed3dd746aff3ba (patch)
tree1d5bb4ce799c6377b49ae73436d50a087db53392 /crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs
parente0f21133cd03c6160fbc97b70bbd50ccde4fe6d9 (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_assists/src/handlers/generate_from_impl_for_enum.rs')
-rw-r--r--crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs b/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs
index 9da23640a..4c1aef8a2 100644
--- a/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs
+++ b/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs
@@ -34,7 +34,7 @@ pub(crate) fn generate_from_impl_for_enum(acc: &mut Assists, ctx: &AssistContext
34 } 34 }
35 let field_type = field_list.fields().next()?.ty()?; 35 let field_type = field_list.fields().next()?.ty()?;
36 let path = match field_type { 36 let path = match field_type {
37 ast::TypeRef::PathType(it) => it, 37 ast::Type::PathType(it) => it,
38 _ => return None, 38 _ => return None,
39 }; 39 };
40 40