-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make bad_style
a silent alias for nonstandard_style
#54251
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
Conversation
Now only `nonstandard_style` is suggested in `rustc -W help`, but `bad_style` will not produce a warning.
Looks good! Perhaps add a test? r=me either way |
This comment has been minimized.
This comment has been minimized.
src/librustc/lint/context.rs
Outdated
lint_groups: FxHashMap<&'static str, (Vec<LintId>, bool, Option<&'static str>)>, | ||
/// is used to store the new names of deprecated lint group names and is paired | ||
/// with `true` if the deprecation is silent. | ||
lint_groups: FxHashMap<&'static str, (Vec<LintId>, bool, Option<(&'static str, bool)>)>, |
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.
I have no stake in this code so feel free to ignore me, but these tuples seem excessive. Wouldn't it be nicer to have a struct
with named fields?
Yeah, we should fix that too
…On Sat, Sep 15, 2018, 9:18 PM Robin Kruppe ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/librustc/lint/context.rs
<#54251 (comment)>:
> @@ -69,8 +69,9 @@ pub struct LintStore {
/// Map of registered lint groups to what lints they expand to. The first
/// bool is true if the lint group was added by a plugin. The optional string
- /// is used to store the new names of deprecated lint group names.
- lint_groups: FxHashMap<&'static str, (Vec<LintId>, bool, Option<&'static str>)>,
+ /// is used to store the new names of deprecated lint group names and is paired
+ /// with `true` if the deprecation is silent.
+ lint_groups: FxHashMap<&'static str, (Vec<LintId>, bool, Option<(&'static str, bool)>)>,
I have no stake in this code so feel free to ignore me, but these tuples
seem excessive. Wouldn't it be nicer to have a struct with named fields?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#54251 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABivSHEP6aB_OH7x4e5-pzbT2JgnEnzZks5ubSE5gaJpZM4WqYc6>
.
|
de5e9a7
to
15ecd19
Compare
@Manishearth: I did a little refactoring — could you double-check that everything looks fine? |
Ping from triage @Manishearth / @rust-lang/compiler: This PR requires your review. |
@bors r+ |
📌 Commit 15ecd19 has been approved by |
Make `bad_style` a silent alias for `nonstandard_style` Now only `nonstandard_style` is suggested in `rustc -W help`, but `bad_style` will not produce a warning. Closes #41646. r? @Manishearth
☀️ Test successful - status-appveyor, status-travis |
Now only
nonstandard_style
is suggested inrustc -W help
, butbad_style
will not produce a warning. Closes #41646.r? @Manishearth