-
Couldn't load subscription status.
- Fork 13.9k
Replace uses of MaybeUninit::uninit_array() with inline const blocks.
#125082
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
Conversation
|
r? @Nilstrieb rustbot has assigned @Nilstrieb. Use |
|
I still prefer |
|
The examples and the compiler code should probably still prefer the stable option. Technically the compared-against example was |
|
this fell down into the "i hope to get to this eventually but will probably never lol" part of my notification queue and i forgot to look at it again, sorry. |
|
Split out the first two parts into #125995. I'll re-summarize this PR once that's merged. |
|
☔ The latest upstream changes (presumably #126016) made this pull request unmergeable. Please resolve the merge conflicts. |
MaybeUninit; remove uninit_array().MaybeUninit::uninit_array() and replace it with inline const blocks.
|
This PR now consists solely of removing |
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.
Thanks!
I am attempting to start a T-libs-api FCP for this in #96097 (comment).
https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/rfcbot.20asleep
MaybeUninit::uninit_array() and replace it with inline const blocks.MaybeUninit::uninit_array() with inline const blocks.
[This PR originally contained the changes in #125995 too. See edit history for the original PR description.]
The documentation of
MaybeUninit::uninit_array()says:The PR adding it also said: #65580 (comment)
That time has come to pass — inline const expressions are stable — so
MaybeUninit::uninit_array()is now unnecessary. The only remaining question is whether it is an important enough convenience to keep it around.I believe it is net good to remove this function, on the principle that it is better to compose two orthogonal features (
MaybeUninitand array construction) than to have a specific function for the specific combination, now that that is possible.