check inside a lambda set for whether it is reference counted

This commit is contained in:
Folkert 2023-07-26 20:06:37 +02:00
parent 73ffce0baa
commit 334253f47f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 34 additions and 31 deletions

View file

@ -2843,7 +2843,10 @@ impl<'a> LayoutRepr<'a> {
}
}
pub fn is_refcounted(&self) -> bool {
pub fn is_refcounted<I>(&self, interner: &I) -> bool
where
I: LayoutInterner<'a>,
{
use self::Builtin::*;
use LayoutRepr::*;
@ -2858,6 +2861,8 @@ impl<'a> LayoutRepr<'a> {
Erased(_) => true,
LambdaSet(lambda_set) => interner.is_refcounted(lambda_set.runtime_representation()),
_ => false,
}
}