Skip to content

Commit

Permalink
Enable co-induction support for Safe Transmute
Browse files Browse the repository at this point in the history
This patch adds the `#[rustc_coinductive]` annotation to
`BikeshedIntrinsicFrom`, so that it's possible to compute transmutability for
recursive types.
  • Loading branch information
bryangarza committed Jun 29, 2023
1 parent 2bfce11 commit 693211a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/mem/transmutability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::marker::ConstParamTy;
#[lang = "transmute_trait"]
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl(implement_via_object = false))]
#[cfg_attr(bootstrap, rustc_deny_explicit_impl)]
#[rustc_coinductive]
pub unsafe trait BikeshedIntrinsicFrom<Src, Context, const ASSUME: Assume = { Assume::NOTHING }>
where
Src: ?Sized,
Expand Down

0 comments on commit 693211a

Please sign in to comment.