Skip to content

Commit 1ad2fa8

Browse files
authored
Merge pull request rust-lang#19180 from joshrotenberg/fix-source-file-url
doc: use fully qualified url for source path
2 parents 1ed0471 + d09cabb commit 1ad2fa8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tools/rust-analyzer/xtask/src/codegen.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ impl fmt::Display for Location {
117117
let path = self.file.strip_prefix(project_root()).unwrap().display().to_string();
118118
let path = path.replace('\\', "/");
119119
let name = self.file.file_name().unwrap();
120-
write!(f, " [{}](/{}#{}) ", name.to_str().unwrap(), path, self.line)
120+
write!(
121+
f,
122+
" [{}](https://github.com/rust-lang/rust-analyzer/blob/master/{}#{}) ",
123+
name.to_str().unwrap(),
124+
path,
125+
self.line
126+
)
121127
}
122128
}
123129

0 commit comments

Comments
 (0)