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 UnsafeCell::from_mut #111645

Open
2 of 4 tasks
JoJoJet opened this issue May 16, 2023 · 5 comments
Open
2 of 4 tasks

Tracking Issue for UnsafeCell::from_mut #111645

JoJoJet opened this issue May 16, 2023 · 5 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@JoJoJet
Copy link
Contributor

JoJoJet commented May 16, 2023

Feature gate: #![feature(unsafe_cell_from_mut)]

This is a tracking issue for UnsafeCell::from_mut, which makes it possible to convert &mut T to &mut UnsafeCell<T> in safe code.

Public API

// core::cell

impl<T: ?Sized> UnsafeCell<T> {
    pub fn from_mut(&mut T) -> &mut Self;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

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

@JoJoJet JoJoJet added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels May 16, 2023
@JoJoJet
Copy link
Contributor Author

JoJoJet commented May 19, 2023

For a straightforward addition like this, what's an appropriate amount of time to wait before pushing for stabilization?

@QuineDot
Copy link

This should also be added to SyncUnsafeCell to keep their APIs the same.

@clarfonthey
Copy link
Contributor

Since Cell::from_mut is stabilised, it feels weird that this isn't.

@dtolnay
Copy link
Member

dtolnay commented Sep 5, 2024

@rust-lang/libs-api:
@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Sep 5, 2024

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. 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

5 participants