diff --git a/crates/fayalite/src/ty.rs b/crates/fayalite/src/ty.rs index 69080c9..55c7e8f 100644 --- a/crates/fayalite/src/ty.rs +++ b/crates/fayalite/src/ty.rs @@ -11,6 +11,7 @@ use crate::{ intern::{Intern, Interned}, reset::{AsyncReset, Reset, SyncReset}, source_location::SourceLocation, + util::ConstUsize, }; use std::{fmt, hash::Hash, iter::FusedIterator, ops::Index}; @@ -166,7 +167,7 @@ impl MatchVariantAndInactiveScope for MatchVariantWith } pub trait FillInDefaultedGenerics { - type Type: Type; + type Type; fn fill_in_defaulted_generics(self) -> Self::Type; } @@ -178,6 +179,22 @@ impl FillInDefaultedGenerics for T { } } +impl FillInDefaultedGenerics for usize { + type Type = usize; + + fn fill_in_defaulted_generics(self) -> Self::Type { + self + } +} + +impl FillInDefaultedGenerics for ConstUsize { + type Type = ConstUsize; + + fn fill_in_defaulted_generics(self) -> Self::Type { + self + } +} + mod sealed { pub trait TypeOrDefaultSealed {} pub trait BaseTypeSealed {}