aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen/gen_assists_docs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen/gen_assists_docs.rs')
-rw-r--r--xtask/src/codegen/gen_assists_docs.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/xtask/src/codegen/gen_assists_docs.rs b/xtask/src/codegen/gen_assists_docs.rs
index 15a02d317..6c1be5350 100644
--- a/xtask/src/codegen/gen_assists_docs.rs
+++ b/xtask/src/codegen/gen_assists_docs.rs
@@ -64,7 +64,7 @@ impl Assist {
64 assert_eq!(lines.next().unwrap().as_str(), "->"); 64 assert_eq!(lines.next().unwrap().as_str(), "->");
65 assert_eq!(lines.next().unwrap().as_str(), "```"); 65 assert_eq!(lines.next().unwrap().as_str(), "```");
66 let after = take_until(lines.by_ref(), "```"); 66 let after = take_until(lines.by_ref(), "```");
67 let location = Location::new(path.to_path_buf()); 67 let location = Location::new(path.to_path_buf(), block.line);
68 acc.push(Assist { id, location, doc, before, after }) 68 acc.push(Assist { id, location, doc, before, after })
69 } 69 }
70 70
@@ -90,6 +90,7 @@ impl fmt::Display for Assist {
90 writeln!( 90 writeln!(
91 f, 91 f,
92 "[discrete]\n=== `{}` 92 "[discrete]\n=== `{}`
93**Source:** {}
93 94
94{} 95{}
95 96
@@ -101,6 +102,7 @@ impl fmt::Display for Assist {
101```rust 102```rust
102{}```", 103{}```",
103 self.id, 104 self.id,
105 self.location,
104 self.doc, 106 self.doc,
105 hide_hash_comments(&before), 107 hide_hash_comments(&before),
106 hide_hash_comments(&after) 108 hide_hash_comments(&after)