From 76202a2c7371a6930db7b83af75c0f5a8ae1d061 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 29 Jul 2020 19:22:15 +0200 Subject: Rename NomialDef -> AdtDef --- crates/ra_ide/src/goto_implementation.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/goto_implementation.rs b/crates/ra_ide/src/goto_implementation.rs index 3ee048f28..16a61d071 100644 --- a/crates/ra_ide/src/goto_implementation.rs +++ b/crates/ra_ide/src/goto_implementation.rs @@ -23,7 +23,7 @@ pub(crate) fn goto_implementation( let krate = sema.to_module_def(position.file_id)?.krate(); - if let Some(nominal_def) = find_node_at_offset::(&syntax, position.offset) { + if let Some(nominal_def) = find_node_at_offset::(&syntax, position.offset) { return Some(RangeInfo::new( nominal_def.syntax().text_range(), impls_for_def(&sema, &nominal_def, krate)?, @@ -40,13 +40,13 @@ pub(crate) fn goto_implementation( fn impls_for_def( sema: &Semantics, - node: &ast::NominalDef, + node: &ast::AdtDef, krate: Crate, ) -> Option> { let ty = match node { - ast::NominalDef::StructDef(def) => sema.to_def(def)?.ty(sema.db), - ast::NominalDef::EnumDef(def) => sema.to_def(def)?.ty(sema.db), - ast::NominalDef::UnionDef(def) => sema.to_def(def)?.ty(sema.db), + ast::AdtDef::StructDef(def) => sema.to_def(def)?.ty(sema.db), + ast::AdtDef::EnumDef(def) => sema.to_def(def)?.ty(sema.db), + ast::AdtDef::UnionDef(def) => sema.to_def(def)?.ty(sema.db), }; let impls = ImplDef::all_in_crate(sema.db, krate); -- cgit v1.2.3