aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xtask/src/codegen/gen_feature_docs.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/xtask/src/codegen/gen_feature_docs.rs b/xtask/src/codegen/gen_feature_docs.rs
index a6f339e7b..dbe583e8e 100644
--- a/xtask/src/codegen/gen_feature_docs.rs
+++ b/xtask/src/codegen/gen_feature_docs.rs
@@ -70,14 +70,15 @@ fn is_valid_feature_name(feature: &str) -> bool {
70impl fmt::Display for Feature { 70impl fmt::Display for Feature {
71 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 71 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
72 writeln!(f, "=== {}", self.id)?; 72 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('\\', "/");
74 let name = self.path.file_name().unwrap(); 75 let name = self.path.file_name().unwrap();
75 76
76 //FIXME: generate line number as well 77 //FIXME: generate line number as well
77 writeln!( 78 writeln!(
78 f, 79 f,
79 "**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/{}[{}]", 80 "**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/{}[{}]",
80 path.display(), 81 path,
81 name.to_str().unwrap(), 82 name.to_str().unwrap(),
82 )?; 83 )?;
83 84