-
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
single life #55432
single life #55432
Conversation
It would be nice to demonstrate the shining correctness here with more run-rustfix tests than this, but unfortunately, that doesn't work with multipart suggestions yet (rust-lang#53934). While we're here, reword the zero-use lifetime suggestion to "elide the unused lifetime" instead of "remove it". (It's classier.)
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.
Nice!
single life
opened PR half past midnight on a saturday
checks out
😅 💔 |
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.
LGTM! I had one suggestion but it's pre-existing, really
|
||
error: lifetime parameter `'b` never used | ||
--> $DIR/zero-uses-in-fn.rs:18:17 | ||
| | ||
LL | fn november<'a, 'b>(s: &'a str) -> (&'a str) { | ||
| --^^ | ||
| | | ||
| help: remove it | ||
| help: elide the unused lifetime |
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.
This...looks funny, no? It seems like we'd be better off making this suggestion "out of line"?
@bors r+ |
📌 Commit faea5bb has been approved by |
⌛ Testing commit faea5bb with merge 9a89b6433c0e1a90228a3256fea0007c726a5b07... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry |
single life * structured ~~autofixable~~ (well, pending #53934 and rust-lang/rustfix#141) suggestions for the single-use-lifetimes lint in the case of function and method reference args * don't consider the anonymous lifetime `'_` as "single-use" (it's intended for exactly this sort of thing) ![single_life](https://user-images.githubusercontent.com/1076988/47613227-3b2b6400-da48-11e8-8efd-cb975ddf537d.png) r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
autofixable(well, pending disambiguate between multiple suggestions and a single multi-span suggestion; or, JSON error format is not round-trippable #53934 and rustfix should handle multi-span suggestions rustfix#141) suggestions for the single-use-lifetimes lint in the case of function and method reference args'_
as "single-use" (it's intended for exactly this sort of thing)r? @nikomatsakis