-
Notifications
You must be signed in to change notification settings - Fork 14k
feat(config): Add ChangeId enum for suppressing warnings #138986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(config): Add ChangeId enum for suppressing warnings #138986
Conversation
|
This PR modifies If appropriate, please update |
|
Interesting stuff—TOML only supports |
This comment has been minimized.
This comment has been minimized.
3d54f33 to
d58b5d5
Compare
|
My |
I believe deserialize_with and serialize_with can only be applied to struct or enum fields, not directly to types themselves. That said, if we're only ever deserializing ChangeId through ChangeIdWrapper, then this approach could work. I was just assuming that ChangeId might also need to be deserialized independently, in which case implementing Deserialize directly for it made more sense. |
3cbe872 to
2579dd1
Compare
Introduces the `ChangeId` enum to allow suppressing `change_id` warnings. Now, `ChangeId` supports both numeric values and the string literal `"ignore"`. Numeric values behave as expected, while `"ignore"` is used to suppress warning messages.
2579dd1 to
0244432
Compare
|
Hello @Kobzol , all suggestions have been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried this locally, seems to work well. The code is also nicer, thanks! Left a few remaining nits.
Also, to make this new option a bit more discovereable, could you please modify the "to silence this warning" message, to mention this new option? Something like NOTE: to silence this warning, update bootstrap.tomlto usechange-id = 138986orchange-id = "ignore" instead. Thanks!
|
This PR modifies If appropriate, please update |
|
Hello @Kobzol, I've updated the descriptions. Thanks a lot for the review |
Kobzol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! After fixing the missing space, you can write @bors r=kobzol to approve this PR.
@bors delegate+
…nge-id description references
7a55d91 to
b24083b
Compare
|
@bors r=kobzol |
|
@Shourya742: 🔑 Insufficient privileges: Not in reviewers |
|
Looks like bors missed my command, sorry. Thank you for the PR! @bors r+ rollup |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#137889 (update outdated doc with new example) - rust-lang#138104 (Greatly simplify doctest parsing and information extraction) - rust-lang#138678 (rustc_resolve: fix instability in lib.rmeta contents) - rust-lang#138986 (feat(config): Add ChangeId enum for suppressing warnings) - rust-lang#139038 (Update target maintainers for thumb targets to reflect new REWG Arm team name) - rust-lang#139045 (bootstrap: update `test_find` test) - rust-lang#139047 (Remove ScopeDepth) Failed merges: - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#137889 (update outdated doc with new example) - rust-lang#138104 (Greatly simplify doctest parsing and information extraction) - rust-lang#138678 (rustc_resolve: fix instability in lib.rmeta contents) - rust-lang#138986 (feat(config): Add ChangeId enum for suppressing warnings) - rust-lang#139038 (Update target maintainers for thumb targets to reflect new REWG Arm team name) - rust-lang#139045 (bootstrap: update `test_find` test) - rust-lang#139047 (Remove ScopeDepth) Failed merges: - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138986 - Shourya742:2025-03-25-add-ignore-to-change-id, r=Kobzol feat(config): Add ChangeId enum for suppressing warnings closes: rust-lang#138925
closes: #138925