-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
B-experimentalBlocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).Blocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-freeze`#![feature(freeze)]``#![feature(freeze)]`T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API 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.
Description
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
juntyr, IndigoLily, terrarier2111, stepancheg, zachs18 and 4 morejuntyr and musjjjuntyr and musjjjuntyr, kupiakos, bjoernager, tim-harding and musjjjuntyr, JieningYu, kupiakos, mintlu8 and musjjjuntyr, orzogc, kupiakos, joseluis, mintlu8 and 1 more
Metadata
Metadata
Assignees
Labels
B-experimentalBlocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).Blocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-freeze`#![feature(freeze)]``#![feature(freeze)]`T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API 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.
Type
Projects
Status
Exploration