diff options
Diffstat (limited to 'crates/ra_tools/src')
-rw-r--r-- | crates/ra_tools/src/codegen.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<String> { | |||
154 | write!(rustfmt.stdin.take().unwrap(), "{}", text)?; | 154 | write!(rustfmt.stdin.take().unwrap(), "{}", text)?; |
155 | let output = rustfmt.wait_with_output()?; | 155 | let output = rustfmt.wait_with_output()?; |
156 | let stdout = String::from_utf8(output.stdout)?; | 156 | let stdout = String::from_utf8(output.stdout)?; |
157 | Ok(stdout) | 157 | let preamble = "Generated file, do not edit by hand, see `crate/ra_tools/src/codegen`"; |
158 | Ok(format!("// {}\n\n{}", preamble, stdout)) | ||
158 | } | 159 | } |
159 | 160 | ||
160 | #[derive(Deserialize, Debug)] | 161 | #[derive(Deserialize, Debug)] |