Skip to content

split MaybeUninit into several features, expand docs a bit #58468

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

Merged
merged 2 commits into from
Feb 17, 2019

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Feb 14, 2019

This splits the maybe_uninit feature gate into several:

  • maybe_uninit for what we will hopefully stabilize soon-ish.
  • maybe_uninit_ref for creating references into MaybeUninit, for which the rules are not yet clear.
  • maybe_uninit_slice for handling slices of MaybeUninit, which needs more API design work.
  • maybe_uninit_array for creating arrays of MaybeUninit using a macro (because we don't have Tracking issue for RFC 2203, "Constants in array repeat expressions" #49147 yet).

Is that an okay thing to do? The goal is to help people avoid APIs we do not want to stabilize yet. I used this to make sure rustc itself does not use get_ref and get_mut.

I also extended the docs to advise against uninitialized integers -- again this is something for which the rules are still being discussed.

@rust-highfive
Copy link
Contributor

r? @shepmaster

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 14, 2019
Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; seems like a good partition except for one thing.

@Centril
Copy link
Contributor

Centril commented Feb 14, 2019

r? @Centril

I think this is a good step allowing us to do incremental progress in a reasonable way...

...As such, r=me with green travis.

If team members disagree with this incremental approach, feel free to r-.

@rust-highfive rust-highfive assigned Centril and unassigned shepmaster Feb 14, 2019
@Centril
Copy link
Contributor

Centril commented Feb 15, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 15, 2019

📌 Commit 95ef9b4 has been approved by Centril

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 15, 2019
@bors bors merged commit 95ef9b4 into rust-lang:master Feb 17, 2019
@RalfJung RalfJung deleted the maybe-uninit-split branch February 17, 2019 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants