mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
parent
b042faeb64
commit
e075e096cf
5 changed files with 62 additions and 12 deletions
|
@ -421,7 +421,15 @@ impl TryConvWith for (FileId, RangeInfo<Vec<NavigationTarget>>) {
|
|||
.into_iter()
|
||||
.map(|nav| (file_id, RangeInfo::new(range, nav)))
|
||||
.try_conv_with_to_vec(world)?;
|
||||
Ok(links.into())
|
||||
if world.options.supports_location_link {
|
||||
Ok(links.into())
|
||||
} else {
|
||||
let locations: Vec<Location> = links
|
||||
.into_iter()
|
||||
.map(|link| Location { uri: link.target_uri, range: link.target_selection_range })
|
||||
.collect();
|
||||
Ok(locations.into())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue