Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for the Freeze trait #121675

Open
3 tasks
oli-obk opened this issue Feb 27, 2024 · 3 comments
Open
3 tasks

Tracking Issue for the Freeze trait #121675

oli-obk opened this issue Feb 27, 2024 · 3 comments
Labels
B-experimental Feature: In-tree experiment; RFC pending or unneeded. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Feb 27, 2024

Feature gate: #![feature(freze)]

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

Unresolved Questions

Footnotes

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

@oli-obk oli-obk added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Feb 27, 2024
@fmease fmease added T-lang Relevant to the language team, which will review and decide on the PR/issue. B-experimental Feature: In-tree experiment; RFC pending or unneeded. labels Mar 1, 2024
@RalfJung
Copy link
Member

RalfJung commented May 2, 2024

@rust-lang/lang -- quick vibe check, do you think this needs an RFC or can it be done with a writeup and FCP in this issue?

@nikomatsakis
Copy link
Contributor

nikomatsakis commented May 8, 2024 via email

@RalfJung
Copy link
Member

RalfJung commented May 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-experimental Feature: In-tree experiment; RFC pending or unneeded. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants