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

Unresolved Questions

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html