mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Look through Arc for goto type definition
This commit is contained in:
parent
cd4502fd47
commit
075380dd56
@ -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 New Issue
Block a user