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 unsafe_cell_access #136327

Open
2 of 4 tasks
pitaj opened this issue Jan 31, 2025 · 0 comments
Open
2 of 4 tasks

Tracking Issue for unsafe_cell_access #136327

pitaj opened this issue Jan 31, 2025 · 0 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@pitaj
Copy link
Contributor

pitaj commented Jan 31, 2025

Feature gate: #![feature(unsafe_cell_access)]

This is a tracking issue for direct access APIs on UnsafeCell (without going through raw pointers).

Public API

// core::cell

impl<T> UnsafeCell<T> {
    pub unsafe fn replace(&self, new_value: T) -> T;
}
impl<T: ?Sized> UnsafeCell<T> {
    pub unsafe fn as_ref_unchecked(&self) -> &T;
    pub unsafe fn as_mut_unchecked(&self) -> &mut T;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

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

@pitaj pitaj added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jan 31, 2025
@pitaj pitaj changed the title Tracking Issue for XXX Tracking Issue for unsafe_cell_access Jan 31, 2025
jhpratt added a commit to jhpratt/rust that referenced this issue Feb 4, 2025
add UnsafeCell direct access APIs

- Implementation for ACP: rust-lang/libs-team#521
- Tracking issue rust-lang#136327
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 4, 2025
Rollup merge of rust-lang#136398 - pitaj:unsafecell_access, r=dtolnay

add UnsafeCell direct access APIs

- Implementation for ACP: rust-lang/libs-team#521
- Tracking issue rust-lang#136327
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC 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

1 participant