-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Comments
@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? |
Clarification Ralf: what is "this"? Stabilizing Freeze? I'm inclined to say RFC. Adding a new auto trait feels like a Big Deal and I'd like a strong write up on the justification and expected usage (that said, I believe this is a good move and there are legit reasons for this)
…On Thu, May 2, 2024, at 7:40 PM, Ralf Jung wrote:
@rust-lang/lang <https://github.com/orgs/rust-lang/teams/lang> -- quick vibe check, do you think this needs an RFC or can it be done with a writeup and FCP in this issue?
—
Reply to this email directly, view it on GitHub <#121675 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AABF4ZUTIXQGZWXW6K3WMFDZAJ3AHAVCNFSM6AAAAABD4CORHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRGE2DMNZVG4>.
You are receiving this because you are on a team that was mentioned.Message ID: ***@***.***>
|
"This" = stabilizing "Freeze" bounds (but not impls)
|
OK. Then yes, I think it requires an RFC.
|
Okay, thanks. So -- if someone wants to help push this towards stabilization, drafting an RFC would be a good next step. :) |
Here is a stabilization RFC for this feature: rust-lang/rfcs#3633 :) |
I found an interesting case in which I needed not-working example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9939beef497fc78bf2951342b379cf4b fixed using freeze: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1efad00dbd416d99abe2da4c9758e2a1 |
Yeah that's basically the same case as @p-avital's |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
What are the soundness implications of writing a value of generic type into a |
Feature gate:
#![feature(freeze)]
This is a tracking issue for the
core::marker::Freeze
traitThis trait allows generic code to restrict generic parameters to types without interior mutability.
Public API
Steps / History
Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: