From 39f50e7bd7a7aa573e6777ca764c020f93aeb205 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 18 Aug 2019 23:36:22 +0300 Subject: use new quote-generated ast --- crates/ra_tools/src/codegen.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_tools/src') diff --git a/crates/ra_tools/src/codegen.rs b/crates/ra_tools/src/codegen.rs index e14092704..6fd672290 100644 --- a/crates/ra_tools/src/codegen.rs +++ b/crates/ra_tools/src/codegen.rs @@ -154,7 +154,8 @@ fn reformat(text: impl std::fmt::Display) -> Result { 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)] -- cgit v1.2.3