From 075380dd56439cdaf1967b7298e10b96b995fc07 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 10 Jul 2020 14:42:26 +0200 Subject: Look through Arc for goto type definition --- crates/ra_ide/src/goto_type_definition.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/goto_type_definition.rs b/crates/ra_ide/src/goto_type_definition.rs index 723c3e8ae..069cb283e 100644 --- a/crates/ra_ide/src/goto_type_definition.rs +++ b/crates/ra_ide/src/goto_type_definition.rs @@ -35,7 +35,7 @@ pub(crate) fn goto_type_definition( Some((ty, node)) })?; - let adt_def = ty.autoderef(db).find_map(|ty| ty.as_adt())?; + let adt_def = ty.autoderef(db).filter_map(|ty| ty.as_adt()).last()?; let nav = adt_def.to_nav(db); Some(RangeInfo::new(node.text_range(), vec![nav])) -- cgit v1.2.3