Skip to content

Commit 693211a

Browse files
committed
Enable co-induction support for Safe Transmute
This patch adds the `#[rustc_coinductive]` annotation to `BikeshedIntrinsicFrom`, so that it's possible to compute transmutability for recursive types.
1 parent 2bfce11 commit 693211a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/mem/transmutability.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::marker::ConstParamTy;
99
#[lang = "transmute_trait"]
1010
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl(implement_via_object = false))]
1111
#[cfg_attr(bootstrap, rustc_deny_explicit_impl)]
12+
#[rustc_coinductive]
1213
pub unsafe trait BikeshedIntrinsicFrom<Src, Context, const ASSUME: Assume = { Assume::NOTHING }>
1314
where
1415
Src: ?Sized,

0 commit comments

Comments
 (0)