fix(toml): deprecate hyphen lint names and error on duplicates#17051
fix(toml): deprecate hyphen lint names and error on duplicates#17051raushan728 wants to merge 4 commits into
Conversation
|
r? @epage rustbot has assigned @epage. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| )); | ||
| } | ||
| if let Some(existing) = seen_normalized.get(&normalized) { | ||
| anyhow::bail!( |
There was a problem hiding this comment.
When a commit has "and" in it, it is a good sign it isn't atomic. This is a separate change.
This is also a breaking change. We either need to start as a future incompat warning or deprecate and error in the next edition.
There was a problem hiding this comment.
Initially had edition-gated error for both but it broke existing crates on 2024 edition.Changed hyphen names to warnings.push only. For duplicates, kept bail! should this follow the same pattern as hyphen names warnings.push for now, error in future edition?
| )); | ||
| } | ||
| if let Some(existing) = seen_normalized.get(&normalized) { | ||
| anyhow::bail!( |
There was a problem hiding this comment.
Should we generate an error or push an error?
fae8f97 to
5cf81cd
Compare
5cf81cd to
0f44606
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Fixes #13943
Lint names in
[lints]accepted both-and_as separators. This meantunexpected_cfgsandunexpected-cfgswere treated as distinct keys by the TOML parser, causing ambiguous behavior when both appeared in the same block.Changes:
-instead of_, will not work in a future edition_before passing them to rustc