From b82d967182d29f1302187fa0e3a56661d0c4082a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 17 Aug 2020 15:49:46 +0200 Subject: Mention that generated .adocs are generaterd --- xtask/src/codegen/gen_assists_docs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xtask/src/codegen/gen_assists_docs.rs') diff --git a/xtask/src/codegen/gen_assists_docs.rs b/xtask/src/codegen/gen_assists_docs.rs index 526941f73..4f4968594 100644 --- a/xtask/src/codegen/gen_assists_docs.rs +++ b/xtask/src/codegen/gen_assists_docs.rs @@ -3,7 +3,7 @@ use std::{fmt, fs, path::Path}; use crate::{ - codegen::{self, extract_comment_blocks_with_empty_lines, Location, Mode}, + codegen::{self, extract_comment_blocks_with_empty_lines, reformat, Location, Mode, PREAMBLE}, project_root, rust_files, Result, }; @@ -15,7 +15,7 @@ pub fn generate_assists_tests(mode: Mode) -> Result<()> { pub fn generate_assists_docs(mode: Mode) -> Result<()> { let assists = Assist::collect()?; let contents = assists.into_iter().map(|it| it.to_string()).collect::>().join("\n\n"); - let contents = contents.trim().to_string() + "\n"; + let contents = format!("//{}\n{}\n", PREAMBLE, contents.trim()); let dst = project_root().join("docs/user/generated_assists.adoc"); codegen::update(&dst, &contents, mode) } @@ -134,7 +134,7 @@ r#####" buf.push_str(&test) } - let buf = crate::reformat(buf)?; + let buf = reformat(buf)?; codegen::update(&project_root().join(codegen::ASSISTS_TESTS), &buf, mode) } -- cgit v1.2.3