Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Mar 6, 2024

This allows us to replace unsafe implementations of core traits with
safe ones, using the TransparentWrapper bound to prove safety via the
impl_for_transparent_wrapper! macro.

joshlf added 2 commits March 6, 2024 07:09
This will allow us to implement `TransparentWrapper` for `T` where `T`
and `T::Inner` do not have `UnsafeCell`s at the same byte ranges. This,
in turn, will let us automatically implement traits for these types so
long as those traits don't require reasoning about `UnsafeCell` ranges
(in other words, all traits other than `NoCell`).
This allows us to replace unsafe implementations of core traits with
safe ones, using the `TransparentWrapper` bound to prove safety via the
`impl_for_transparent_wrapper!` macro.
@joshlf joshlf requested a review from jswrenn March 6, 2024 15:24
@joshlf joshlf changed the base branch from main to unsafe-cell-variance March 6, 2024 15:25
@joshlf joshlf changed the title Unsafe cell transparent wrapper Implement TransparentWrapper for UnsafeCell Mar 6, 2024
@joshlf joshlf changed the title Implement TransparentWrapper for UnsafeCell Implement TransparentWrapper for UnsafeCell Mar 6, 2024
Base automatically changed from unsafe-cell-variance to main March 6, 2024 15:51
@joshlf joshlf added this pull request to the merge queue Mar 6, 2024
Merged via the queue into main with commit 7e65049 Mar 6, 2024
@joshlf joshlf deleted the unsafe-cell-transparent-wrapper branch March 6, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants