diff options
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/goto_type_definition.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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( | |||
35 | Some((ty, node)) | 35 | Some((ty, node)) |
36 | })?; | 36 | })?; |
37 | 37 | ||
38 | let adt_def = ty.autoderef(db).find_map(|ty| ty.as_adt())?; | 38 | let adt_def = ty.autoderef(db).filter_map(|ty| ty.as_adt()).last()?; |
39 | 39 | ||
40 | let nav = adt_def.to_nav(db); | 40 | let nav = adt_def.to_nav(db); |
41 | Some(RangeInfo::new(node.text_range(), vec![nav])) | 41 | Some(RangeInfo::new(node.text_range(), vec![nav])) |