Tracking Issue for the Freeze
trait · Issue #121675 · rust-lang/rust (original) (raw)
Feature gate: #![feature(freeze)]
This is a tracking issue for the core:📑:Freeze
trait
This trait allows generic code to restrict generic parameters to types without interior mutability.
Public API
use std:📑:Freeze;
trait Trait<T: Freeze + 'static> { const VALUE: T; const VALUE_REF: &'static T = &Self::VALUE; }
Steps / History
- Implementation: Expose the Freeze trait again (unstably) and forbid implementing it manually #121840
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- naming the trait differently (see #121501 (comment))