Skip to content

Commit 13a996f

Browse files
committed
Force / slashes on windows
1 parent 7e3ee77 commit 13a996f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xtask/src/codegen/gen_feature_docs.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,15 @@ fn is_valid_feature_name(feature: &str) -> bool {
7070
impl fmt::Display for Feature {
7171
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7272
writeln!(f, "=== {}", self.id)?;
73-
let path = self.path.strip_prefix(&project_root()).unwrap();
73+
let path = self.path.strip_prefix(&project_root()).unwrap().display().to_string();
74+
let path = path.replace('\\', "/");
7475
let name = self.path.file_name().unwrap();
7576

7677
//FIXME: generate line number as well
7778
writeln!(
7879
f,
7980
"**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/{}[{}]",
80-
path.display(),
81+
path,
8182
name.to_str().unwrap(),
8283
)?;
8384

0 commit comments

Comments
 (0)