Skip to content

Commit 813d127

Browse files
stepanchegcalebcartwright
authored andcommitted
Clarify generated marker requires a config option
1 parent ace7241 commit 813d127

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Note this hit the rustup distributions prior to the v1.4.38 release as part of a
6161

6262
- 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)
6363
- 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)
64+
if `format_generated_files` option is set to `false` (by default `@generated` files are formatted)
6465
- 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)
6566

6667
See the section on the configuration site for more information

Configurations.md

+2
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,8 @@ fn add_one(x: i32) -> i32 {
930930

931931
Format generated files. A file is considered generated
932932
if any of the first five lines contain a `@generated` comment marker.
933+
By default, generated files are reformatted, i. e. `@generated` marker is ignored.
934+
This option is currently ignored for stdin (`@generated` in stdin is ignored.)
933935

934936
- **Default value**: `true`
935937
- **Possible values**: `true`, `false`

0 commit comments

Comments
 (0)