Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/codegen.rs')
| -rw-r--r-- | xtask/src/codegen.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/xtask/src/codegen.rs b/xtask/src/codegen.rs index bc04b9474f..18f49643dc 100644 --- a/xtask/src/codegen.rs +++ b/xtask/src/codegen.rs @@ -24,6 +24,7 @@ impl flags::Codegen { diagnostics_docs::generate(self.check); assists_doc_tests::generate(self.check); parser_inline_tests::generate(self.check); + feature_docs::generate(self.check) // diagnostics_docs::generate(self.check) doesn't generate any tests // lints::generate(self.check) Updating clones the rust repo, so don't run it unless // explicitly asked for @@ -116,13 +117,7 @@ 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, - "https://github.com/rust-lang/rust-analyzer/blob/master/{}#L{}[{}]", - path, - self.line, - name.to_str().unwrap() - ) + write!(f, " [{}]({}#{}) ", name.to_str().unwrap(), path, self.line) } } @@ -162,7 +157,7 @@ fn reformat(text: String) -> String { } fn add_preamble(cg: CodegenType, mut text: String) -> String { - let preamble = format!("//! Generated by `cargo codegen {cg}`, do not edit by hand.\n\n"); + let preamble = format!("//! Generated by `cargo xtask codegen {cg}`, do not edit by hand.\n\n"); text.insert_str(0, &preamble); text } @@ -186,7 +181,7 @@ fn ensure_file_contents(cg: CodegenType, file: &Path, contents: &str, check: boo file.display(), if std::env::var("CI").is_ok() { format!( - "\n NOTE: run `cargo codegen {cg}` locally and commit the updated files\n" + "\n NOTE: run `cargo xtask codegen {cg}` locally and commit the updated files\n" ) } else { "".to_owned() |