Mention that generated .adocs are generaterd

This commit is contained in:
Aleksey Kladov
2020-08-17 15:49:46 +02:00
parent 0b2b9a5508
commit b82d967182
5 changed files with 26 additions and 21 deletions

View File

@@ -62,17 +62,6 @@ pub fn run_rustfmt(mode: Mode) -> Result<()> {
Ok(())
}
fn reformat(text: impl std::fmt::Display) -> Result<String> {
let _e = pushenv("RUSTUP_TOOLCHAIN", "stable");
ensure_rustfmt()?;
let stdout = run!(
"rustfmt --config-path {} --config fn_single_line=true", project_root().join("rustfmt.toml").display();
<text.to_string().as_bytes()
)?;
let preamble = "Generated file, do not edit by hand, see `xtask/src/codegen`";
Ok(format!("//! {}\n\n{}\n", preamble, stdout))
}
fn ensure_rustfmt() -> Result<()> {
let out = run!("rustfmt --version")?;
if !out.contains("stable") {