Skip to content

Commit 5afa0cf

Browse files
committed
fix: Be more explicit in how the lints table is loaded
1 parent 86932bd commit 5afa0cf

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

text/3389-manifest-lint.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,16 @@ package override the workspace on a lint-by-lint basis.
130130
cargo will contain a mapping of tool to underlying command (e.g. `rust` to
131131
`rustc`, `clippy` to `rustc` when clippy is the driver, `rustdoc` to
132132
`rustdoc`). When running the underlying command for the specified package,
133-
cargo will transform the lints from `lint = level` to `--level lint`, sort them
134-
by priority and then lint name, and pass them on the command line before other
135-
configuration, `RUSTFLAGS`, allowing user configuration to override package
136-
configuration. These flags will be fingerprinted so changing them will cause a
137-
rebuild only for the commands where they are used.
133+
cargo will:
134+
1. Transform the lints from `tool.lint = level` to `--level tool::lint`
135+
- Leaving off the `tool::` when it is `rust`
136+
- cargo will error if `lint` contains `::` as the first part is assumed to be
137+
a tool and it should be listed in that tool's table
138+
2. Sort them by priority and then lint name
139+
3. Pass them on the command line before other configuration like
140+
`RUSTFLAGS`, allowing user configuration to override package configuration.
141+
- These flags will be fingerprinted so changing them will cause a rebuild only
142+
for the commands where they are used.
138143

139144
Note that this means that `[lints]` does not affect dependencies which is
140145
normally not an issue due to `--cap-lints` being used for dependencies.

0 commit comments

Comments
 (0)