-
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
Deprecate the FxHashMap()
and FxHashSet()
constructor function hack
#55114
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Nit: I'd personally use |
This is possible in struct construction cases but not when local variables are initialized and immediately used by calling e.g. I will adjust all use sites accordingly |
Also, imports won't get fewer, as most of the time you need the type name for the struct fields |
Uh, I'd prefer if you wouldn't do that change. That's throwing away useful type information, which can already be hard to get by with all the inference we are doing. It doesn't make code more readable. We should optimize for reading the code, which happens all the time, not changing the type, which only happens rarely. |
So, is this fully replacing #52591? Looks to be just a partial successor? |
Yes that's on purpose. Otherwise I'll never stay ahead of the bitrot curve |
So... how do I continue? 😆 @petrochenkov are you fine with not changing everything to |
@oli-obk |
I still think this does more harm then good -- now I have to scroll to the struct definition to figure out the types. That can be arbitrarily far away. But I won't fight over this. |
FWIW, in my own projects, the rule I follow is usually:
|
r=me with whichever conclusion we reach. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #54671) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
Ad @nikomatsakis in #55114 (comment): |
@sanmai-NL true. But that particular comment was just giving my preferences. In any case, I think such docs might be appropriate for rustc-guide -- feels like it doesn't belong in the API guidelines (particularly since these decisions don't affect the API very much). (That said, I do think there is an API decision here, in that I've come to favor implementing |
@bors r+ |
📌 Commit 8892efb25d88d37da63ae434d3150da4c405e1d5 has been approved by |
@bors r=nikomatsakis p=1 bitrot priority |
📌 Commit 53e92f4 has been approved by |
Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hack
💔 Test failed - status-appveyor |
Looks like it timed out after 3h. @bors retry |
⌛ Testing commit 53e92f4 with merge 528939ce01557bc516a4993e81be9d0ff8a19e85... |
💔 Test failed - status-appveyor |
@bors retry AWS S3 Outage in US-WEST-1. |
Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hack
☀️ Test successful - status-appveyor, status-travis |
No description provided.