mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-04 18:58:41 +00:00
use fully qualified url for source path
This commit is contained in:
parent
957d3450da
commit
ea9e179287
1 changed files with 7 additions and 1 deletions
|
@ -117,7 +117,13 @@ impl fmt::Display for Location {
|
|||
let path = self.file.strip_prefix(project_root()).unwrap().display().to_string();
|
||||
let path = path.replace('\\', "/");
|
||||
let name = self.file.file_name().unwrap();
|
||||
write!(f, " [{}](/{}#{}) ", name.to_str().unwrap(), path, self.line)
|
||||
write!(
|
||||
f,
|
||||
" [{}](https://github.com/rust-lang/rust-analyzer/blob/master/{}#{}) ",
|
||||
name.to_str().unwrap(),
|
||||
path,
|
||||
self.line
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue