Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Mar 2, 2024

TransparentWrapper provides enough safety guarantees that, for some traits, it can be used as a bound to implement those traits without needing extra safety logic.

This commit introduces the impl_for_transparent_wrapper! macro, which emits the appropriate bound on TransparentWrapper in order to justify the soundness of a given trait impl internally, thus not requiring the caller to provide a safety proof.

@joshlf joshlf force-pushed the transparent-wrapper-trait-impls branch 3 times, most recently from 12b26e6 to 699046b Compare March 2, 2024 23:24
@joshlf joshlf marked this pull request as ready for review March 2, 2024 23:24
@joshlf joshlf requested a review from jswrenn March 2, 2024 23:24
`TransparentWrapper` provides enough safety guarantees that, for some
traits, it can be used as a bound to implement those traits without
needing extra safety logic.

This commit introduces the `impl_for_transparent_wrapper!` macro, which
emits the appropriate bound on `TransparentWrapper` in order to justify
the soundness of a given trait impl internally, thus not requiring the
caller to provide a safety proof.
@joshlf joshlf force-pushed the transparent-wrapper-trait-impls branch from 699046b to 5c026a0 Compare March 3, 2024 20:52
@joshlf joshlf added this pull request to the merge queue Mar 4, 2024
Merged via the queue into main with commit 7653f37 Mar 4, 2024
@joshlf joshlf deleted the transparent-wrapper-trait-impls branch March 4, 2024 04:23
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