Skip to content

Leverage core::marker::Freeze #941

Closed
@jswrenn

Description

With rust-lang/rust#121501, Rust may expose and subsequently stabilize the Freeze trait, which is automatically implemented for all types free of UnsafeCell (excluding by indirection such as &UnsafeCell). This is analogous to our NoCell trait, but our trait must be explicitly derived.

Once Freeze is stabilized, we should first emit a

where
     Self: Freeze

bound on the definition of NoCell when zerocopy is compiled with sufficiently-recent toolchains.

Then, we should consider whether to eliminate our NoCell trait altogether in favor of re-exporting Freeze as NoCell.

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