Open
Description
opened on Feb 27, 2024
Feature gate: #![feature(freeze)]
This is a tracking issue for the core::marker::Freeze
trait
This trait allows generic code to restrict generic parameters to types without interior mutability.
Public API
use std::marker::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))
Footnotes
Metadata
Assignees
Labels
Blocker: In-tree experiment; RFC pending, not yet approved or unneeded.Category: An issue tracking the progress of sth. like the implementation of an RFC`#![feature(freeze)]`Relevant to the language team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Activity