-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Remove unnecessary Symbol
stringification in clippy
#92952
Conversation
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit e427d340bdb803ed5e4de98b7172790daf0389ff with merge ea957266538b17f07990ca8ba2aa4c18ce94e397... |
This comment has been minimized.
This comment has been minimized.
e427d34
to
e822fb8
Compare
Hmm, it seems like the rustc version is actually hard to get rid of. It also seems to only be used in an error path. So I removed that change. |
Symbol
stringificationSymbol
stringification in clippy
This comment has been minimized.
This comment has been minimized.
1 similar comment
r? @flip1995 |
The job Click to see the possible cause of the failure (guessed by this bot)
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
Hm, afaik the rust benchmarking does not touch clippy at all.. 🤔 |
Yeah clippy isn't perf tested. Are you sure you want to land this PR here? It'll land faster on the clippy repo. We could also rollup, of course |
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'm good with landing it here or in Clippy. Since this is a NFC it doesn't have to go through the Clippy repo and the sync process.
But there's still an error:
error[E0425]: cannot find value `Underscore` in module `sym`
--> src/tools/clippy/clippy_lints/src/matches.rs:964:52
|
964 | let mut ident_bind_name = sym::Underscore;
| ^^^^^^^^^^ not found in `sym`
|
help: consider importing one of these items
|
1 | use crate::matches::hir::LifetimeName::Underscore;
|
1 | use rustc_ast::ExprKind::Underscore;
|
1 | use rustc_hir::LifetimeName::Underscore;
|
1 | use rustc_span::symbol::kw::Underscore;
|
What does NFC mean btw? Also: It seemed to work in rust-analyzer sigh I'll close this and reopen against the clippy repo (this PR originally changed rustc too, which is why I filed it here). |
NFC = non-functional change. I think you need |
Ok, I've opened rust-lang/rust-clippy#8310. Closing this PR then! |
This should (slightly) improve performance and enhance code quality.