-
Notifications
You must be signed in to change notification settings - Fork 13k
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
WIP: Add lint for String
in diagnostic implementation
#108461
Conversation
24e8e76
to
0aec263
Compare
0aec263
to
264c198
Compare
#[derive(LintDiagnostic)] | ||
#[diag(lint_string_in_diag)] | ||
#[note] | ||
pub struct StringInDiagnostic; |
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.
a little disappointed that this doesn't contain a String
It might be more useful to instead lint expressions constructing diagnostics so we can see if we're calling a potentially problematic function to construct the string. There's quite a few legitimate use cases here |
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #108682) made this pull request unmergeable. Please resolve the merge conflicts. |
Implementing the check described in #108162 (comment) so we can see what happens. Implemented as a lint so it can be
#[allow]
'dcc @Nilstrieb
@rustbot label +A-translation
r? ghost