[red-knot] make KnownClass::is_singleton a const fn (#14211)

Follow-up from missed review comment on
https://github.com/astral-sh/ruff/pull/14182
This commit is contained in:
Carl Meyer 2024-11-08 13:37:25 -08:00 committed by GitHub
parent 645ce7e5ec
commit c0c4ae14ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1581,7 +1581,7 @@ impl<'db> KnownClass {
}
}
fn is_singleton(self) -> bool {
const fn is_singleton(self) -> bool {
// TODO there are other singleton types (EllipsisType, NotImplementedType)
match self {
Self::NoneType | Self::NoDefaultType => true,