Skip to content

Commit 4a734da

Browse files
committed
Removing Any trait bound from downcast_unchecked to circumvent ICE rust-lang/rust#95311
1 parent 4d7ab54 commit 4a734da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hv/crates/hv-boxed/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub trait Storable<T: ?Sized, U: ?Sized>: Storage<T> {
7676
#[allow(clippy::missing_safety_doc)]
7777
unsafe fn downcast_unchecked(self) -> Self::Downcast
7878
where
79-
U: Any + Sized;
79+
U: Sized;
8080
}
8181

8282
/// Trait describing storage for a given type.
@@ -122,7 +122,7 @@ impl<T: ?Sized, Space, U: ?Sized> Storable<T, U> for NonCopyable<T, Space> {
122122
type Downcast = NonCopyable<U, Space>;
123123
unsafe fn downcast_unchecked(self) -> Self::Downcast
124124
where
125-
U: Any + Sized,
125+
U: Sized,
126126
{
127127
let size = mem::size_of::<U>();
128128
let mut space = mem::MaybeUninit::<Space>::uninit();
@@ -206,7 +206,7 @@ impl<T: ?Sized, Space: Copy, U: Copy> Storable<T, U> for Copyable<T, Space> {
206206
type Downcast = Copyable<U, Space>;
207207
unsafe fn downcast_unchecked(self) -> Self::Downcast
208208
where
209-
U: Any + Sized,
209+
U: Sized,
210210
{
211211
let size = mem::size_of::<U>();
212212
let mut space = mem::MaybeUninit::<Space>::uninit();

0 commit comments

Comments
 (0)