about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTyler Weaver <maybe@tylerjw.dev>2023-01-14 11:10:40 -0700
committerTyler Weaver <maybe@tylerjw.dev>2023-01-14 11:10:40 -0700
commitc0da8acb72529fdfc156b006e9ee5d2f18f1a730 (patch)
treecef5ad20506c42c5166e9ed5d97da7e672dbf223
parentd950279a039b5a598c87b347ba5d2f151a071a98 (diff)
downloadrust-c0da8acb72529fdfc156b006e9ee5d2f18f1a730.tar.gz
rust-c0da8acb72529fdfc156b006e9ee5d2f18f1a730.zip
Comment that lint_configuration.md is machine generated
-rw-r--r--book/src/lint_configuration.md5
-rw-r--r--clippy_lints/src/utils/internal_lints/metadata_collector.rs12
2 files changed, 16 insertions, 1 deletions
diff --git a/book/src/lint_configuration.md b/book/src/lint_configuration.md
index cfaaefe3ea1..f79dbb50ff4 100644
--- a/book/src/lint_configuration.md
+++ b/book/src/lint_configuration.md
@@ -1,3 +1,8 @@
+<!--
+This file is generated by `cargo collect-metadata`.
+Please use that command to update the file and do not edit it by hand.
+-->
+
 ## Lint Configuration Options
 | <div style="width:290px">Option</div> | Default Value |
 |--|--|
diff --git a/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
index 47604f6933b..1995c373835 100644
--- a/clippy_lints/src/utils/internal_lints/metadata_collector.rs
+++ b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
@@ -239,7 +239,17 @@ impl Drop for MetadataCollector {
             .create(true)
             .open(MARKDOWN_OUTPUT_FILE)
             .unwrap();
-        writeln!(file, "{}", self.get_markdown_docs(),).unwrap();
+        writeln!(
+            file,
+            "<!--
+This file is generated by `cargo collect-metadata`.
+Please use that command to update the file and do not edit it by hand.
+-->
+
+{}",
+            self.get_markdown_docs(),
+        )
+        .unwrap();
     }
 }