From 4a734da8a2989d77d5fd328d3d74f86d908700a4 Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 8 Apr 2022 15:06:20 -0700 Subject: [PATCH] Removing Any trait bound from downcast_unchecked to circumvent ICE https://github.com/rust-lang/rust/issues/95311 --- hv/crates/hv-boxed/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hv/crates/hv-boxed/src/lib.rs b/hv/crates/hv-boxed/src/lib.rs index 30d5f18..3de0385 100644 --- a/hv/crates/hv-boxed/src/lib.rs +++ b/hv/crates/hv-boxed/src/lib.rs @@ -76,7 +76,7 @@ pub trait Storable: Storage { #[allow(clippy::missing_safety_doc)] unsafe fn downcast_unchecked(self) -> Self::Downcast where - U: Any + Sized; + U: Sized; } /// Trait describing storage for a given type. @@ -122,7 +122,7 @@ impl Storable for NonCopyable { type Downcast = NonCopyable; unsafe fn downcast_unchecked(self) -> Self::Downcast where - U: Any + Sized, + U: Sized, { let size = mem::size_of::(); let mut space = mem::MaybeUninit::::uninit(); @@ -206,7 +206,7 @@ impl Storable for Copyable { type Downcast = Copyable; unsafe fn downcast_unchecked(self) -> Self::Downcast where - U: Any + Sized, + U: Sized, { let size = mem::size_of::(); let mut space = mem::MaybeUninit::::uninit();