-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add Applicability to suggestion lints: Take 2 #3459
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
Changes from 5 commits
fad267c
9096269
3740da2
0c6483b
4e74eef
adc638e
6eb8e6d
87e72a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
|
||
use crate::rustc::lint::{in_external_macro, EarlyContext, EarlyLintPass, LintArray, LintContext, LintPass}; | ||
use crate::rustc::{declare_tool_lint, lint_array}; | ||
use crate::rustc_errors::Applicability; | ||
use crate::syntax::ast::*; | ||
use crate::syntax_pos; | ||
use crate::utils::{snippet_opt, span_lint_and_sugg}; | ||
|
@@ -300,6 +301,7 @@ impl WarningType { | |
"mistyped literal suffix", | ||
"did you mean to write", | ||
grouping_hint.to_string(), | ||
Applicability::MachineApplicable, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this should be machine applicable. It's just a "looks wrong, needs user attention, probably should be X" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yea |
||
), | ||
WarningType::UnreadableLiteral => span_lint_and_sugg( | ||
cx, | ||
|
@@ -308,6 +310,7 @@ impl WarningType { | |
"long literal lacking separators", | ||
"consider", | ||
grouping_hint.to_owned(), | ||
Applicability::MachineApplicable, | ||
), | ||
WarningType::LargeDigitGroups => span_lint_and_sugg( | ||
cx, | ||
|
@@ -316,6 +319,7 @@ impl WarningType { | |
"digit groups should be smaller", | ||
"consider", | ||
grouping_hint.to_owned(), | ||
Applicability::MachineApplicable, | ||
), | ||
WarningType::InconsistentDigitGrouping => span_lint_and_sugg( | ||
cx, | ||
|
@@ -324,6 +328,7 @@ impl WarningType { | |
"digits grouped inconsistently by underscores", | ||
"consider", | ||
grouping_hint.to_owned(), | ||
Applicability::MachineApplicable, | ||
), | ||
WarningType::DecimalRepresentation => span_lint_and_sugg( | ||
cx, | ||
|
@@ -332,6 +337,7 @@ impl WarningType { | |
"integer literal has a better hexadecimal representation", | ||
"consider", | ||
grouping_hint.to_owned(), | ||
Applicability::MachineApplicable, | ||
), | ||
}; | ||
} | ||
|
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.
Shouldn't that read
applicability
here?