diff --git a/src/stabby/boxed_impl.rs b/src/stabby/boxed_impl.rs index 69dc505afc..199498b9c4 100644 --- a/src/stabby/boxed_impl.rs +++ b/src/stabby/boxed_impl.rs @@ -3,11 +3,13 @@ use crate::{ ඞ::{ReprC, __HasNiche__}, }; pub use stabby::boxed::{Box, BoxedSlice, BoxedStr}; -use stabby::{abi::U1, alloc::IAlloc, IStable}; +use stabby::{alloc::IAlloc, IStable}; + +type USIZE = ::Size; unsafe impl ReprC for Box where - Box: IStable, + Box: IStable, { type CLayout = *const CVoid; fn is_valid(it: &'_ Self::CLayout) -> bool { @@ -16,7 +18,7 @@ where } unsafe impl __HasNiche__ for Box where - Box: IStable, + Box: IStable, { fn is_niche(it: &'_ ::CLayout) -> bool { it.is_null() @@ -25,7 +27,7 @@ where unsafe impl ReprC for BoxedSlice where - Box: IStable, + Box: IStable, { type CLayout = Tuple2_Layout<*const CVoid, *const CVoid>; fn is_valid(it: &'_ Self::CLayout) -> bool { @@ -36,7 +38,7 @@ where } unsafe impl __HasNiche__ for BoxedSlice where - Box: IStable, + Box: IStable, { fn is_niche(it: &'_ ::CLayout) -> bool { it._0.is_null() || it._1.is_null() diff --git a/src/stabby/sync_impl.rs b/src/stabby/sync_impl.rs index 5a27e2fc3f..eca3526ffa 100644 --- a/src/stabby/sync_impl.rs +++ b/src/stabby/sync_impl.rs @@ -3,11 +3,13 @@ use crate::{ ඞ::{ReprC, __HasNiche__}, }; pub use stabby::sync::{Arc, ArcSlice, ArcStr, Weak, WeakSlice, WeakStr}; -use stabby::{abi::U1, alloc::IAlloc, IStable}; +use stabby::{alloc::IAlloc, IStable}; + +type USIZE = ::Size; unsafe impl ReprC for Arc where - Arc: IStable, + Arc: IStable, { type CLayout = *const CVoid; fn is_valid(it: &'_ Self::CLayout) -> bool { @@ -16,7 +18,7 @@ where } unsafe impl __HasNiche__ for Arc where - Arc: IStable, + Arc: IStable, { fn is_niche(it: &'_ ::CLayout) -> bool { it.is_null() @@ -25,7 +27,7 @@ where unsafe impl ReprC for ArcSlice where - Arc: IStable, + Arc: IStable, { type CLayout = Tuple2_Layout<*const CVoid, *const CVoid>; fn is_valid(it: &'_ Self::CLayout) -> bool { @@ -36,7 +38,7 @@ where } unsafe impl __HasNiche__ for ArcSlice where - Arc: IStable, + Arc: IStable, { fn is_niche(it: &'_ ::CLayout) -> bool { it._0.is_null() || it._1.is_null() @@ -62,7 +64,7 @@ where unsafe impl ReprC for Weak where - Weak: IStable, + Weak: IStable, { type CLayout = *const CVoid; fn is_valid(it: &'_ Self::CLayout) -> bool { @@ -71,7 +73,7 @@ where } unsafe impl __HasNiche__ for Weak where - Weak: IStable, + Weak: IStable, { fn is_niche(it: &'_ ::CLayout) -> bool { it.is_null() @@ -80,7 +82,7 @@ where unsafe impl ReprC for WeakSlice where - Weak: IStable, + Weak: IStable, { type CLayout = Tuple2_Layout<*const CVoid, *const CVoid>; fn is_valid(it: &'_ Self::CLayout) -> bool { @@ -91,7 +93,7 @@ where } unsafe impl __HasNiche__ for WeakSlice where - Weak: IStable, + Weak: IStable, { fn is_niche(it: &'_ ::CLayout) -> bool { it._0.is_null() || it._1.is_null()