You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
We've decided that our Immutable will need to have slightly different semantics than stdlib Freeze - namely, it bans interior mutability recursively (ie, even via reference/pointer indirection), while Freeze does not. See #1155.
Activity
Rollup merge of rust-lang#121840 - oli-obk:freeze, r=dtolnay
Rollup merge of rust-lang#121840 - oli-obk:freeze, r=dtolnay
Rollup merge of rust-lang#121840 - oli-obk:freeze, r=dtolnay
Unrolled build for rust-lang#121840
Rollup merge of #121840 - oli-obk:freeze, r=dtolnay
Rollup merge of #121840 - oli-obk:freeze, r=dtolnay
Rollup merge of #121840 - oli-obk:freeze, r=dtolnay
joshlf commentedon May 3, 2024
We've decided that our
Immutablewill need to have slightly different semantics than stdlibFreeze- namely, it bans interior mutability recursively (ie, even via reference/pointer indirection), whileFreezedoes not. See #1155.Rollup merge of #121840 - oli-obk:freeze, r=dtolnay
Rollup merge of #121840 - oli-obk:freeze, r=dtolnay