use new quote-generated ast

This commit is contained in:
Aleksey Kladov 2019-08-18 23:36:22 +03:00
parent 8cefdb5527
commit 39f50e7bd7
3 changed files with 1410 additions and 1290 deletions

View file

@ -154,7 +154,8 @@ fn reformat(text: impl std::fmt::Display) -> Result<String> {
write!(rustfmt.stdin.take().unwrap(), "{}", text)?;
let output = rustfmt.wait_with_output()?;
let stdout = String::from_utf8(output.stdout)?;
Ok(stdout)
let preamble = "Generated file, do not edit by hand, see `crate/ra_tools/src/codegen`";
Ok(format!("// {}\n\n{}", preamble, stdout))
}
#[derive(Deserialize, Debug)]