From 693211ad7017493278a8030433286c2df052e316 Mon Sep 17 00:00:00 2001 From: Bryan Garza <1396101+bryangarza@users.noreply.github.com> Date: Thu, 29 Jun 2023 15:01:39 -0700 Subject: [PATCH] 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. --- core/src/mem/transmutability.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/mem/transmutability.rs b/core/src/mem/transmutability.rs index 3805d149b..aed23119f 100644 --- a/core/src/mem/transmutability.rs +++ b/core/src/mem/transmutability.rs @@ -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 where Src: ?Sized,