This commit is contained in:
Douglas Creager 2025-12-07 14:51:21 -05:00
parent 81fc51e197
commit 72e0c32a99
2 changed files with 6 additions and 11 deletions

View File

@ -13,15 +13,14 @@ use crate::types::class::ClassType;
use crate::types::class_base::ClassBase; use crate::types::class_base::ClassBase;
use crate::types::constraints::ConstraintSet; use crate::types::constraints::ConstraintSet;
use crate::types::instance::{Protocol, ProtocolInstanceType}; use crate::types::instance::{Protocol, ProtocolInstanceType};
use crate::types::signatures::{Parameters, ParametersKind}; use crate::types::signatures::Parameters;
use crate::types::tuple::{TupleSpec, TupleType, walk_tuple_type}; use crate::types::tuple::{TupleSpec, TupleType, walk_tuple_type};
use crate::types::visitor::{TypeCollector, TypeVisitor, walk_type_with_recursion_guard}; use crate::types::visitor::{TypeCollector, TypeVisitor, walk_type_with_recursion_guard};
use crate::types::{ use crate::types::{
ApplyTypeMappingVisitor, BindingContext, BoundTypeVarIdentity, BoundTypeVarInstance, ApplyTypeMappingVisitor, BindingContext, BoundTypeVarIdentity, BoundTypeVarInstance,
CallableSignature, CallableType, CallableTypeKind, CallableTypes, ClassLiteral, ClassLiteral, FindLegacyTypeVarsVisitor, HasRelationToVisitor, IsDisjointVisitor,
FindLegacyTypeVarsVisitor, HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor, IsEquivalentVisitor, KnownClass, KnownInstanceType, MaterializationKind, NormalizedVisitor,
KnownClass, KnownInstanceType, MaterializationKind, NormalizedVisitor, Signature, Type, Type, TypeContext, TypeMapping, TypeRelation, TypeVarBoundOrConstraints, TypeVarIdentity,
TypeContext, TypeMapping, TypeRelation, TypeVarBoundOrConstraints, TypeVarIdentity,
TypeVarInstance, TypeVarKind, TypeVarVariance, UnionType, declaration_type, TypeVarInstance, TypeVarKind, TypeVarVariance, UnionType, declaration_type,
walk_bound_type_var_type, walk_bound_type_var_type,
}; };

View File

@ -153,10 +153,6 @@ impl<'db> CallableSignature<'db> {
self.overloads.iter() self.overloads.iter()
} }
pub(crate) fn as_slice(&self) -> &[Signature<'db>] {
&self.overloads
}
pub(crate) fn with_inherited_generic_context( pub(crate) fn with_inherited_generic_context(
&self, &self,
db: &'db dyn Db, db: &'db dyn Db,
@ -401,8 +397,8 @@ impl<'db> CallableSignature<'db> {
} }
/// Checks whether the given slice contains a single signature, and that signature is a /// Checks whether the given slice contains a single signature, and that signature is a
/// ParamSpec signature. If so, returns the [`BoundTypeVarInstance`] for the ParamSpec, along /// `ParamSpec` signature. If so, returns the [`BoundTypeVarInstance`] for the `ParamSpec`,
/// with the return type of the signature. /// along with the return type of the signature.
fn signatures_is_single_paramspec( fn signatures_is_single_paramspec(
signatures: &[Signature<'db>], signatures: &[Signature<'db>],
) -> Option<(BoundTypeVarInstance<'db>, Option<Type<'db>>)> { ) -> Option<(BoundTypeVarInstance<'db>, Option<Type<'db>>)> {