mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Look through Arc for goto type definition
This commit is contained in:
parent
cd4502fd47
commit
075380dd56
1 changed files with 1 additions and 1 deletions
|
@ -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]))
|
||||
|
|
Loading…
Reference in a new issue