From 7022ea52b5f2a0262c2cd96b290ddb8ec0af0df9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 7 Feb 2021 14:15:02 +0300 Subject: AdtDef -> Adt --- crates/ide/src/goto_implementation.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/goto_implementation.rs b/crates/ide/src/goto_implementation.rs index 761a98b2c..3990305fc 100644 --- a/crates/ide/src/goto_implementation.rs +++ b/crates/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::AdtDef, + node: &ast::Adt, krate: Crate, ) -> Option> { let ty = match node { - ast::AdtDef::Struct(def) => sema.to_def(def)?.ty(sema.db), - ast::AdtDef::Enum(def) => sema.to_def(def)?.ty(sema.db), - ast::AdtDef::Union(def) => sema.to_def(def)?.ty(sema.db), + ast::Adt::Struct(def) => sema.to_def(def)?.ty(sema.db), + ast::Adt::Enum(def) => sema.to_def(def)?.ty(sema.db), + ast::Adt::Union(def) => sema.to_def(def)?.ty(sema.db), }; let impls = Impl::all_in_crate(sema.db, krate); -- cgit v1.2.3