Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/rustc/src/lints/levels.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Here’s how these different lint controls interact:
warning: 1 warning emitted
```

3. [CLI level flags](#via-compiler-flag) take precedence over attributes.
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: hm, last I recall the cli lint levels behave as if they are a "synthetic" crate level attr yes (but one layer "outer"). Though I seem to recall the adjust logic is sometimes a bit convoluted, especially when it comes to precedence on the same "node".


The order of the flags matter; flags on the right take precedence over earlier flags.

Expand Down
Loading