mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix tests
This commit is contained in:
parent
8a5f74a24f
commit
dda916bc4d
8 changed files with 108 additions and 98 deletions
|
@ -345,7 +345,8 @@ impl TryConvWith for &NavigationTarget {
|
|||
type Output = Location;
|
||||
fn try_conv_with(self, world: &ServerWorld) -> Result<Location> {
|
||||
let line_index = world.analysis().file_line_index(self.file_id());
|
||||
to_location(self.file_id(), self.range(), &world, &line_index)
|
||||
let range = self.focus_range().unwrap_or(self.full_range());
|
||||
to_location(self.file_id(), range, &world, &line_index)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,7 +362,7 @@ pub fn to_location_link(
|
|||
let res = LocationLink {
|
||||
origin_selection_range: Some(target.range.conv_with(line_index)),
|
||||
target_uri: url.to_string(),
|
||||
target_range: target.info.range().conv_with(&tgt_line_index),
|
||||
target_range: target.info.full_range().conv_with(&tgt_line_index),
|
||||
target_selection_range: target
|
||||
.info
|
||||
.focus_range()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue