]> git.lizzy.rs Git - rust.git/blobdiff - Configurations.md
add non-regression test to existing doc attributes
[rust.git] / Configurations.md
index 4c621e7b5d20ac64ebe9a9e6baf43a6e013e6cb1..7f44fa5d3e87df9b593fc2cfedb59613b330b90b 100644 (file)
@@ -1342,6 +1342,25 @@ Unix or Windows line endings
 - **Possible values**: `"Auto"`, `"Native"`, `"Unix"`, `"Windows"`
 - **Stable**: Yes
 
+#### `Auto` (default):
+
+The newline style is detected automatically on a per-file basis. Files
+with mixed line endings will be converted to the first detected line
+ending style.
+
+#### `Native`
+
+Line endings will be converted to `\r\n` on Windows and `\n` on all
+other platforms.
+
+#### `Unix`
+
+Line endings will be converted to `\n`.
+
+#### `Windows`
+
+Line endings will be converted to `\r\n`.
+
 ## `normalize_comments`
 
 Convert /* */ comments to // comments where possible
@@ -2157,8 +2176,8 @@ ignore = [
 
 Specifies which edition is used by the parser.
 
-- **Default value**: `Edition2015`
-- **Possible values**: `Edition2015`, `Edition2018`
+- **Default value**: `2015`
+- **Possible values**: `2015`, `2018`
 - **Stable**: No
 
 ### Example
@@ -2166,7 +2185,33 @@ Specifies which edition is used by the parser.
 If you want to format code that requires edition 2018, add the following to your config file:
 
 ```toml
-edition = "Edition2018"
+edition = "2018"
+```
+
+## `normalize_doc_attributes`
+
+Convert `#![doc]` and `#[doc]` attributes to `//!` and `///` doc comments.
+
+- **Default value**: `false`
+- **Possible values**: `true`, `false`
+- **Stable**: No
+
+#### `false` (default):
+
+```rust
+#![doc = "Example documentation"]
+
+#[doc = "Example item documentation"]
+pub enum Foo {}
+```
+
+#### `true`:
+
+```rust
+//! Example documentation
+
+/// Example item documentation
+pub enum Foo {}
 ```
 
 ## `emit_mode`