From 0a9e3ccc262fbcbd4cdaab30384f8cb71584544b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 16:49:13 +0200 Subject: Rename FieldDef -> Field --- crates/ra_hir_def/src/adt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir_def/src/adt.rs') diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index 4994a2125..2be23c45d 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs @@ -179,7 +179,7 @@ impl VariantData { impl HasChildSource for VariantId { type ChildId = LocalFieldId; - type Value = Either; + type Value = Either; fn child_source(&self, db: &dyn DefDatabase) -> InFile> { let (src, module_id) = match self { @@ -194,7 +194,7 @@ impl HasChildSource for VariantId { } VariantId::UnionId(it) => ( it.lookup(db).source(db).map(|it| { - it.record_field_def_list() + it.record_field_list() .map(ast::StructKind::Record) .unwrap_or(ast::StructKind::Unit) }), @@ -218,7 +218,7 @@ pub enum StructKind { fn lower_struct( db: &dyn DefDatabase, expander: &mut CfgExpander, - trace: &mut Trace>, + trace: &mut Trace>, ast: &InFile, ) -> StructKind { let ctx = LowerCtx::new(db, ast.file_id); -- cgit v1.2.3 From 609680ef97dbf82c07b6b06e21aa366423892304 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:52:53 +0200 Subject: Rename EnumDef -> Enum --- crates/ra_hir_def/src/adt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_def/src/adt.rs') diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index 2be23c45d..df98ded62 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs @@ -124,7 +124,7 @@ impl HasChildSource for EnumId { fn lower_enum( db: &dyn DefDatabase, trace: &mut Trace, - ast: &InFile, + ast: &InFile, module_id: ModuleId, ) { let expander = CfgExpander::new(db, ast.file_id, module_id.krate); -- cgit v1.2.3 From 1766aae145c6925a33e427f2fe6ef2a56c301665 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:56:53 +0200 Subject: Rename EnumVariant -> Variant --- crates/ra_hir_def/src/adt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_def/src/adt.rs') diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index df98ded62..231c1dfab 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs @@ -112,7 +112,7 @@ impl EnumData { impl HasChildSource for EnumId { type ChildId = LocalEnumVariantId; - type Value = ast::EnumVariant; + type Value = ast::Variant; fn child_source(&self, db: &dyn DefDatabase) -> InFile> { let src = self.lookup(db).source(db); let mut trace = Trace::new_for_map(); @@ -123,7 +123,7 @@ impl HasChildSource for EnumId { fn lower_enum( db: &dyn DefDatabase, - trace: &mut Trace, + trace: &mut Trace, ast: &InFile, module_id: ModuleId, ) { -- cgit v1.2.3 From 2e2642efccd5855e4158b01a006e7884a96982bb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 20:51:43 +0200 Subject: Remove TypeAscriptionOwner --- crates/ra_hir_def/src/adt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_def/src/adt.rs') diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index 231c1dfab..f8523d03f 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs @@ -8,7 +8,7 @@ use hir_expand::{ InFile, }; use ra_arena::{map::ArenaMap, Arena}; -use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner, VisibilityOwner}; +use ra_syntax::ast::{self, NameOwner, VisibilityOwner}; use crate::{ body::{CfgExpander, LowerCtx}, @@ -251,7 +251,7 @@ fn lower_struct( || Either::Right(fd.clone()), || FieldData { name: fd.name().map(|n| n.as_name()).unwrap_or_else(Name::missing), - type_ref: TypeRef::from_ast_opt(&ctx, fd.ascribed_type()), + type_ref: TypeRef::from_ast_opt(&ctx, fd.ty()), visibility: RawVisibility::from_ast(db, ast.with_value(fd.visibility())), }, ); -- cgit v1.2.3 From f95f425ae4199e814e6956be1d9bb59a14758c07 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 21:02:55 +0200 Subject: Use ty to access most TypeRefs --- crates/ra_hir_def/src/adt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_def/src/adt.rs') diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index f8523d03f..6cb56a1cd 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs @@ -234,7 +234,7 @@ fn lower_struct( || Either::Left(fd.clone()), || FieldData { name: Name::new_tuple_field(i), - type_ref: TypeRef::from_ast_opt(&ctx, fd.type_ref()), + type_ref: TypeRef::from_ast_opt(&ctx, fd.ty()), visibility: RawVisibility::from_ast(db, ast.with_value(fd.visibility())), }, ); -- cgit v1.2.3