aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen/gen_diagnostic_docs.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-03-08 18:25:44 +0000
committerAleksey Kladov <[email protected]>2021-03-08 18:45:43 +0000
commit095b9110b5e4e166c86501a1f0603cf626a48127 (patch)
tree681c69a7341c95a19de7d606be8d17c4136d29fb /xtask/src/codegen/gen_diagnostic_docs.rs
parent1eb61203b725684fd2c7e25ac7e2d53eef10c64c (diff)
Unused params
Diffstat (limited to 'xtask/src/codegen/gen_diagnostic_docs.rs')
-rw-r--r--xtask/src/codegen/gen_diagnostic_docs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/xtask/src/codegen/gen_diagnostic_docs.rs b/xtask/src/codegen/gen_diagnostic_docs.rs
index a2561817b..2504e09ef 100644
--- a/xtask/src/codegen/gen_diagnostic_docs.rs
+++ b/xtask/src/codegen/gen_diagnostic_docs.rs
@@ -7,13 +7,13 @@ use crate::{
7 project_root, rust_files, Result, 7 project_root, rust_files, Result,
8}; 8};
9 9
10pub(crate) fn generate_diagnostic_docs(mode: Mode) -> Result<()> { 10pub(crate) fn generate_diagnostic_docs() -> Result<()> {
11 let diagnostics = Diagnostic::collect()?; 11 let diagnostics = Diagnostic::collect()?;
12 let contents = 12 let contents =
13 diagnostics.into_iter().map(|it| it.to_string()).collect::<Vec<_>>().join("\n\n"); 13 diagnostics.into_iter().map(|it| it.to_string()).collect::<Vec<_>>().join("\n\n");
14 let contents = format!("//{}\n{}\n", PREAMBLE, contents.trim()); 14 let contents = format!("//{}\n{}\n", PREAMBLE, contents.trim());
15 let dst = project_root().join("docs/user/generated_diagnostic.adoc"); 15 let dst = project_root().join("docs/user/generated_diagnostic.adoc");
16 codegen::update(&dst, &contents, mode)?; 16 codegen::update(&dst, &contents, Mode::Overwrite)?;
17 Ok(()) 17 Ok(())
18} 18}
19 19