Skip to content

Commit c0da8ac

Browse files
committed
Comment that lint_configuration.md is machine generated
1 parent d950279 commit c0da8ac

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

book/src/lint_configuration.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
This file is generated by `cargo collect-metadata`.
3+
Please use that command to update the file and do not edit it by hand.
4+
-->
5+
16
## Lint Configuration Options
27
| <div style="width:290px">Option</div> | Default Value |
38
|--|--|

clippy_lints/src/utils/internal_lints/metadata_collector.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,17 @@ impl Drop for MetadataCollector {
239239
.create(true)
240240
.open(MARKDOWN_OUTPUT_FILE)
241241
.unwrap();
242-
writeln!(file, "{}", self.get_markdown_docs(),).unwrap();
242+
writeln!(
243+
file,
244+
"<!--
245+
This file is generated by `cargo collect-metadata`.
246+
Please use that command to update the file and do not edit it by hand.
247+
-->
248+
249+
{}",
250+
self.get_markdown_docs(),
251+
)
252+
.unwrap();
243253
}
244254
}
245255

0 commit comments

Comments
 (0)