Skip to content

Commit 3099121

Browse files
committed
Rework explanation of CLI lint level flags
I think the previous wording as either wrong or confusing. I would consider the CLI flags at a *lower* ranking, since source attributes are able to override the CLI flag.
1 parent 71e0027 commit 3099121

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/doc/rustc/src/lints/levels.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ Here’s how these different lint controls interact:
393393
warning: 1 warning emitted
394394
```
395395
396-
3. [CLI level flags](#via-compiler-flag) take precedence over attributes.
396+
3. [CLI level flags](#via-compiler-flag) override the default level of a lint. They essentially behave like crate-level attributes. Attributes within the source code take precedence over CLI flags, except for `-F`/`--forbid`, which cannot be overridden.
397397
398398
The order of the flags matter; flags on the right take precedence over earlier flags.
399399

0 commit comments

Comments
 (0)