Update mod.rs

This commit is contained in:
Shunsuke Shibayama 2024-09-16 21:59:22 +09:00
parent fd76f56ba4
commit cb9380f3aa

View file

@ -1956,6 +1956,7 @@ impl HasType for Type {
impl HasLevel for Type { impl HasLevel for Type {
fn level(&self) -> Option<usize> { fn level(&self) -> Option<usize> {
println!("lev: {self}");
match self { match self {
Self::FreeVar(v) => v.level(), Self::FreeVar(v) => v.level(),
Self::Ref(t) => t.level(), Self::Ref(t) => t.level(),
@ -2034,7 +2035,10 @@ impl HasLevel for Type {
Some(min) Some(min)
} }
} }
Self::Structural(ty) => ty.level(), Self::Structural(ty) => {
set_recursion_limit!(None, 128);
ty.level()
}
Self::Guard(guard) => guard.to.level(), Self::Guard(guard) => guard.to.level(),
Self::Quantified(quant) => quant.level(), Self::Quantified(quant) => quant.level(),
Self::Bounded { sub, sup } => { Self::Bounded { sub, sup } => {