Skip to content

Make mem::uninitialized inaccessible in future editions #98862

Open

Description

We have reached the end of what we can do in #66151 (making mem::uninitialized panic when it is used incorrectly) without enormous amounts of crater failures. However, there is still one more thing we can do: we can make mem::uninitialized() inaccessible in future editions. We seem to have the support of at least one lang-team member as well. :) Cc @joshtriplett

@bstrie mentioned they have a patch doing this, though the RFC got closed. Reading the Zulip discussion, it looks like some libs team members were concerned, though the concern seems to have been mostly around hiding things from the docs. I am not talking about the docs here, I just want edition 2024 code to not compile when it calls mem::uninitialized. @m-ou-se I wonder if you would be fine with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-maybe-future-editionSomething we may consider for a future edition.T-langRelevant to the language team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    • Status

      Needs help: Design

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions