-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
#68712 adds methods to convert RefCell
guards Ref
/RefMut
into references with the lifetime of the underlying cell.
The feature gate for the issue is #![feature(cell_leak)]
.
Unresolved Questions
- Should similar methods be provided for
MutexGuard
andRwLockReadGuard
/RwLockWriteGuard
? (Add methods to 'leak' RefCell borrows as references with the lifetime of the original reference #68712 (comment)) - Should
unsafe
methods be added to forcefully revert a leak? (Add undo_leak to reset RefCell borrow state #69528 (review)) - For
undo_leak
, would it make more sense not to return a reference (i.e., separate this fromget_mut
)? (Add undo_leak to reset RefCell borrow state #69528 (comment))
gabrielfalcao, Sycration, totikom, p--b, CeleritasCelery and 5 moregabrielfalcao, Sycration and andreisilviudragneastanislav-tkach, vincent-herlemont, 197g, gabrielfalcao, Sycration and 3 more
Metadata
Metadata
Assignees
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.