forked from libre-chip/fayalite
add FillInDefaultedGenerics<Type = Self> bound for SizeType
This commit is contained in:
parent
e4210a672f
commit
fbe4585578
1 changed files with 9 additions and 3 deletions
|
|
@ -14,8 +14,9 @@ use crate::{
|
|||
sim::value::{SimValue, ToSimValueWithType},
|
||||
source_location::SourceLocation,
|
||||
ty::{
|
||||
CanonicalType, OpaqueSimValueSize, OpaqueSimValueSlice, OpaqueSimValueWriter,
|
||||
OpaqueSimValueWritten, StaticType, Type, TypeProperties, impl_match_variant_as_self,
|
||||
CanonicalType, FillInDefaultedGenerics, OpaqueSimValueSize, OpaqueSimValueSlice,
|
||||
OpaqueSimValueWriter, OpaqueSimValueWritten, StaticType, Type, TypeProperties,
|
||||
impl_match_variant_as_self,
|
||||
},
|
||||
util::{ConstBool, ConstUsize, GenericConstBool, GenericConstUsize, interned_bit, slice_range},
|
||||
};
|
||||
|
|
@ -113,7 +114,11 @@ impl_known_size_base! {
|
|||
}
|
||||
|
||||
pub trait KnownSize:
|
||||
GenericConstUsize + sealed::SizeTypeSealed + sealed::SizeSealed + Default
|
||||
GenericConstUsize
|
||||
+ sealed::SizeTypeSealed
|
||||
+ sealed::SizeSealed
|
||||
+ Default
|
||||
+ FillInDefaultedGenerics<Type = Self>
|
||||
{
|
||||
const SIZE: Self;
|
||||
type ArrayMatch<Element: Type>: AsRef<[Expr<Element>]>
|
||||
|
|
@ -161,6 +166,7 @@ pub trait SizeType:
|
|||
+ 'static
|
||||
+ Serialize
|
||||
+ DeserializeOwned
|
||||
+ FillInDefaultedGenerics<Type = Self>
|
||||
{
|
||||
type Size: Size<SizeType = Self>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue