1
0
Fork 0

add FillInDefaultedGenerics<Type = Self> bound for SizeType

This commit is contained in:
Jacob Lifshay 2025-12-10 20:03:29 -08:00
parent e4210a672f
commit fbe4585578
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ

View file

@ -14,8 +14,9 @@ use crate::{
sim::value::{SimValue, ToSimValueWithType}, sim::value::{SimValue, ToSimValueWithType},
source_location::SourceLocation, source_location::SourceLocation,
ty::{ ty::{
CanonicalType, OpaqueSimValueSize, OpaqueSimValueSlice, OpaqueSimValueWriter, CanonicalType, FillInDefaultedGenerics, OpaqueSimValueSize, OpaqueSimValueSlice,
OpaqueSimValueWritten, StaticType, Type, TypeProperties, impl_match_variant_as_self, OpaqueSimValueWriter, OpaqueSimValueWritten, StaticType, Type, TypeProperties,
impl_match_variant_as_self,
}, },
util::{ConstBool, ConstUsize, GenericConstBool, GenericConstUsize, interned_bit, slice_range}, util::{ConstBool, ConstUsize, GenericConstBool, GenericConstUsize, interned_bit, slice_range},
}; };
@ -113,7 +114,11 @@ impl_known_size_base! {
} }
pub trait KnownSize: pub trait KnownSize:
GenericConstUsize + sealed::SizeTypeSealed + sealed::SizeSealed + Default GenericConstUsize
+ sealed::SizeTypeSealed
+ sealed::SizeSealed
+ Default
+ FillInDefaultedGenerics<Type = Self>
{ {
const SIZE: Self; const SIZE: Self;
type ArrayMatch<Element: Type>: AsRef<[Expr<Element>]> type ArrayMatch<Element: Type>: AsRef<[Expr<Element>]>
@ -161,6 +166,7 @@ pub trait SizeType:
+ 'static + 'static
+ Serialize + Serialize
+ DeserializeOwned + DeserializeOwned
+ FillInDefaultedGenerics<Type = Self>
{ {
type Size: Size<SizeType = Self>; type Size: Size<SizeType = Self>;
} }