about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStepan Koltsov <stepan.koltsov@gmail.com>2022-02-07 04:39:53 +0000
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2022-02-10 22:18:32 -0600
commit813d127c824eb22e3fe1fc7a34bf12ad4c0fa2f6 (patch)
treeb5ada055d8473b7f43e56098c8d31dc851939239
parentace7241087bedd2ea26d7b1dfcdd6133cbf77ce7 (diff)
downloadrust-813d127c824eb22e3fe1fc7a34bf12ad4c0fa2f6.tar.gz
rust-813d127c824eb22e3fe1fc7a34bf12ad4c0fa2f6.zip
Clarify generated marker requires a config option
-rw-r--r--CHANGELOG.md1
-rw-r--r--Configurations.md2
2 files changed, 3 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b9208d31e0..5b233608583 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,6 +61,7 @@ Note this hit the rustup distributions prior to the v1.4.38 release as part of a
 
 - New `One` variant added to `imports_granularity` configuration option which can be used to reformat all imports into a single use statement [#4669](https://github.com/rust-lang/rustfmt/issues/4669)
 - rustfmt will now skip files that are annotated with `@generated` at the top of the file [#3958](https://github.com/rust-lang/rustfmt/issues/3958)
+  if `format_generated_files` option is set to `false` (by default `@generated` files are formatted)
 - New configuration option `hex_literal_case` that allows user to control the casing utilized for hex literals [PR #4903](https://github.com/rust-lang/rustfmt/pull/4903)
 
 See the section on the configuration site for more information
diff --git a/Configurations.md b/Configurations.md
index 4476f2a449b..2e2b0f7cfbe 100644
--- a/Configurations.md
+++ b/Configurations.md
@@ -930,6 +930,8 @@ fn add_one(x: i32) -> i32 {
 
 Format generated files. A file is considered generated
 if any of the first five lines contain a `@generated` comment marker.
+By default, generated files are reformatted, i. e. `@generated` marker is ignored.
+This option is currently ignored for stdin (`@generated` in stdin is ignored.)
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`