-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add suggestions to deprecation lints #58002
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
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.
🛫 👕
@@ -577,7 +579,18 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { | |||
format!("{}", message) | |||
}; | |||
|
|||
self.lint_node(lint, id, span, &msg); | |||
let mut diag = self.struct_span_lint_node(lint, id, span, &msg); |
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.
if only we had a HirId
here, we could use struct_span_lint_hir
(#50928)
r? @zackmdavis @bors r+ |
📌 Commit 4056b57 has been approved by |
Add suggestions to deprecation lints Clippy used to do this suggestion, but the clippy lints happen after the deprecation lints so we ended up never seeing the structured suggestions.
☀️ Test successful - checks-travis, status-appveyor |
add rustfix-able suggestions to trim_{left,right} deprecations Fixes rust-lang#53802 (technically already fixed by rust-lang#58002, but that issue is about these methods).
add rustfix-able suggestions to trim_{left,right} deprecations Fixes rust-lang#53802 (technically already fixed by rust-lang#58002, but that issue is about these methods).
add rustfix-able suggestions to trim_{left,right} deprecations Fixes rust-lang#53802 (technically already fixed by rust-lang#58002, but that issue is about these methods).
add rustfix-able suggestions to trim_{left,right} deprecations Fixes rust-lang#53802 (technically already fixed by rust-lang#58002, but that issue is about these methods).
add rustfix-able suggestions to trim_{left,right} deprecations Fixes rust-lang#53802 (technically already fixed by rust-lang#58002, but that issue is about these methods).
Clippy used to do this suggestion, but the clippy lints happen after the deprecation lints so we ended up never seeing the structured suggestions.