Skip to content

Stabilizing statically intialized UnsafeCell? #25634

Description

@aldanor

Seeing as the cell types have been somewhat recently stabilized, is static cell initialization supposed to be stabilized too at some point?

pub const FOO: Foo = Foo {
    counter: UnsafeCell { value: 0 },
};

currently triggers "error: use of unstable library feature 'core'" lint, however there's really no other way to work around this as far as I know.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions