remove now-moot lifetime

This commit is contained in:
Douglas Creager 2025-11-07 15:46:50 -05:00
parent 8c2603f2d2
commit 1bc64d6e22
11 changed files with 82 additions and 91 deletions

View File

@ -548,7 +548,7 @@ impl<'db> PropertyInstanceType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> ConstraintSet<'db> {
self.is_equivalent_to_impl(db, other, inferable, &IsEquivalentVisitor::default())
}
@ -557,7 +557,7 @@ impl<'db> PropertyInstanceType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
let getter_equivalence = if let Some(getter) = self.getter(db) {
@ -1286,7 +1286,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
target: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> Type<'db> {
self.filter_union(db, |elem| {
!elem
@ -1613,7 +1613,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
target: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> ConstraintSet<'db> {
self.has_relation_to(db, target, inferable, TypeRelation::Subtyping)
}
@ -1627,7 +1627,7 @@ impl<'db> Type<'db> {
db: &'db dyn Db,
target: Type<'db>,
constraints: ConstraintSet<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> ConstraintSet<'db> {
self.has_relation_to(
db,
@ -1649,7 +1649,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
target: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> ConstraintSet<'db> {
self.has_relation_to(db, target, inferable, TypeRelation::Assignability)
}
@ -1667,7 +1667,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
target: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
) -> ConstraintSet<'db> {
self.has_relation_to_impl(
@ -1684,7 +1684,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
target: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -2552,7 +2552,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
other: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> ConstraintSet<'db> {
self.is_equivalent_to_impl(db, other, inferable, &IsEquivalentVisitor::default())
}
@ -2561,7 +2561,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
other: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
if self == other {
@ -2679,7 +2679,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
other: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> ConstraintSet<'db> {
self.is_disjoint_from_impl(
db,
@ -2694,7 +2694,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
other: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
) -> ConstraintSet<'db> {
@ -2702,7 +2702,7 @@ impl<'db> Type<'db> {
db: &'db dyn Db,
protocol: ProtocolInstanceType<'db>,
other: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
) -> ConstraintSet<'db> {
@ -10541,7 +10541,7 @@ impl<'db> BoundMethodType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -10575,7 +10575,7 @@ impl<'db> BoundMethodType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
self.function(db)
@ -10708,7 +10708,7 @@ impl<'db> CallableType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -10733,7 +10733,7 @@ impl<'db> CallableType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
if self == other {
@ -10817,7 +10817,7 @@ impl<'db> KnownBoundMethodType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -10919,7 +10919,7 @@ impl<'db> KnownBoundMethodType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
match (self, other) {
@ -11964,7 +11964,7 @@ impl<'db> UnionType<'db> {
self,
db: &'db dyn Db,
other: Self,
_inferable: InferableTypeVars<'_, 'db>,
_inferable: InferableTypeVars<'db>,
_visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
if self == other {
@ -12066,7 +12066,7 @@ impl<'db> IntersectionType<'db> {
self,
db: &'db dyn Db,
other: Self,
_inferable: InferableTypeVars<'_, 'db>,
_inferable: InferableTypeVars<'db>,
_visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
if self == other {

View File

@ -2690,7 +2690,7 @@ struct ArgumentTypeChecker<'a, 'db> {
return_ty: Type<'db>,
errors: &'a mut Vec<BindingError<'db>>,
inferable_typevars: InferableTypeVars<'db, 'db>,
inferable_typevars: InferableTypeVars<'db>,
specialization: Option<Specialization<'db>>,
}
@ -3039,7 +3039,7 @@ impl<'a, 'db> ArgumentTypeChecker<'a, 'db> {
fn finish(
self,
) -> (
InferableTypeVars<'db, 'db>,
InferableTypeVars<'db>,
Option<Specialization<'db>>,
Type<'db>,
) {
@ -3109,7 +3109,7 @@ pub(crate) struct Binding<'db> {
return_ty: Type<'db>,
/// The inferable typevars in this signature.
inferable_typevars: InferableTypeVars<'db, 'db>,
inferable_typevars: InferableTypeVars<'db>,
/// The specialization that was inferred from the argument types, if the callable is generic.
specialization: Option<Specialization<'db>>,
@ -3361,7 +3361,7 @@ impl<'db> Binding<'db> {
#[derive(Clone, Debug)]
struct BindingSnapshot<'db> {
return_ty: Type<'db>,
inferable_typevars: InferableTypeVars<'db, 'db>,
inferable_typevars: InferableTypeVars<'db>,
specialization: Option<Specialization<'db>>,
argument_matches: Box<[MatchedArgument<'db>]>,
parameter_tys: Box<[Option<Type<'db>>]>,

View File

@ -524,7 +524,7 @@ impl<'db> ClassType<'db> {
self,
db: &'db dyn Db,
other: ClassType<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> ConstraintSet<'db> {
self.has_relation_to_impl(
db,
@ -540,7 +540,7 @@ impl<'db> ClassType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -593,7 +593,7 @@ impl<'db> ClassType<'db> {
self,
db: &'db dyn Db,
other: ClassType<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
if self == other {

View File

@ -246,7 +246,7 @@ impl<'db> ConstraintSet<'db> {
pub(crate) fn satisfied_by_all_typevars(
self,
db: &'db dyn Db,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> bool {
self.node.satisfied_by_all_typevars(db, inferable)
}
@ -816,11 +816,7 @@ impl<'db> Node<'db> {
self.satisfies(db, constraint)
}
fn satisfied_by_all_typevars(
self,
db: &'db dyn Db,
inferable: InferableTypeVars<'_, 'db>,
) -> bool {
fn satisfied_by_all_typevars(self, db: &'db dyn Db, inferable: InferableTypeVars<'db>) -> bool {
match self {
Node::AlwaysTrue => return true,
Node::AlwaysFalse => return false,

View File

@ -970,7 +970,7 @@ impl<'db> FunctionType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -1009,7 +1009,7 @@ impl<'db> FunctionType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
if self.normalized(db) == other.normalized(db) {

View File

@ -1,7 +1,6 @@
use std::cell::RefCell;
use std::collections::hash_map::Entry;
use std::fmt::Display;
use std::marker::PhantomData;
use itertools::Itertools;
use ruff_python_ast as ast;
@ -121,9 +120,9 @@ pub(crate) fn typing_self<'db>(
}
#[derive(Clone, Copy, Debug)]
pub(crate) enum InferableTypeVars<'a, 'db> {
pub(crate) enum InferableTypeVars<'db> {
None,
One(InferableTypeVarsInner<'db>, PhantomData<&'a ()>),
One(InferableTypeVarsInner<'db>),
}
#[salsa::tracked(debug, heap_size=ruff_memory_usage::heap_size)]
@ -136,14 +135,10 @@ pub(crate) struct InferableTypeVarsInner<'db> {
impl get_size2::GetSize for InferableTypeVarsInner<'_> {}
impl<'db> BoundTypeVarInstance<'db> {
pub(crate) fn is_inferable(
self,
db: &'db dyn Db,
inferable: InferableTypeVars<'_, 'db>,
) -> bool {
pub(crate) fn is_inferable(self, db: &'db dyn Db, inferable: InferableTypeVars<'db>) -> bool {
match inferable {
InferableTypeVars::None => false,
InferableTypeVars::One(inner, _) => inner
InferableTypeVars::One(inner) => inner
.inferable(db)
.binary_search(&self.identity(db))
.is_ok(),
@ -151,24 +146,24 @@ impl<'db> BoundTypeVarInstance<'db> {
}
}
impl<'db> InferableTypeVars<'_, 'db> {
impl<'db> InferableTypeVars<'db> {
pub(crate) fn from_bound_typevars(
db: &'db dyn Db,
bound_typevars: impl IntoIterator<Item = BoundTypeVarIdentity<'db>>,
) -> Self {
InferableTypeVars::One(
InferableTypeVarsInner::from_bound_typevars(db, bound_typevars),
PhantomData,
)
InferableTypeVars::One(InferableTypeVarsInner::from_bound_typevars(
db,
bound_typevars,
))
}
pub(crate) fn merge(self, db: &'db dyn Db, other: Self) -> Self {
match (self, other) {
(InferableTypeVars::None, InferableTypeVars::None) => self,
(InferableTypeVars::One(_, _), InferableTypeVars::None) => self,
(InferableTypeVars::None, InferableTypeVars::One(_, _)) => other,
(InferableTypeVars::One(self_inner, _), InferableTypeVars::One(other_inner, _)) => {
InferableTypeVars::One(self_inner.merge(db, other_inner), PhantomData)
(InferableTypeVars::One(_), InferableTypeVars::None) => self,
(InferableTypeVars::None, InferableTypeVars::One(_)) => other,
(InferableTypeVars::One(self_inner), InferableTypeVars::One(other_inner)) => {
InferableTypeVars::One(self_inner.merge(db, other_inner))
}
}
}
@ -177,7 +172,7 @@ impl<'db> InferableTypeVars<'_, 'db> {
#[expect(dead_code)]
pub(crate) fn display(self, db: &'db dyn Db) -> impl Display {
let inferable = match self {
InferableTypeVars::One(inner, _) => inner.inferable(db),
InferableTypeVars::One(inner) => inner.inferable(db),
InferableTypeVars::None => return String::from("[]"),
};
format!(
@ -319,7 +314,7 @@ impl<'db> GenericContext<'db> {
)
}
pub(crate) fn inferable_typevars(self, db: &'db dyn Db) -> InferableTypeVars<'db, 'db> {
pub(crate) fn inferable_typevars(self, db: &'db dyn Db) -> InferableTypeVars<'db> {
#[derive(Default)]
struct CollectTypeVars<'db> {
typevars: RefCell<SmallVec<[BoundTypeVarIdentity<'db>; 4]>>,
@ -366,7 +361,7 @@ impl<'db> GenericContext<'db> {
// This ensures that salsa caches the InferableTypeVarsInner, not the InferableTypeVars
// that wraps it. (That way InferableTypeVars can contain a reference, and doesn't need to
// impl salsa::Update.)
InferableTypeVars::One(inferable_typevars_inner(db, self), PhantomData)
InferableTypeVars::One(inferable_typevars_inner(db, self))
}
pub(crate) fn variables(
@ -727,7 +722,7 @@ fn is_subtype_in_invariant_position<'db>(
derived_materialization: MaterializationKind,
base_type: &Type<'db>,
base_materialization: MaterializationKind,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
) -> ConstraintSet<'db> {
@ -805,7 +800,7 @@ fn has_relation_in_invariant_position<'db>(
derived_materialization: Option<MaterializationKind>,
base_type: &Type<'db>,
base_materialization: Option<MaterializationKind>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -1153,7 +1148,7 @@ impl<'db> Specialization<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -1231,7 +1226,7 @@ impl<'db> Specialization<'db> {
self,
db: &'db dyn Db,
other: Specialization<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
if self.materialization_kind(db) != other.materialization_kind(db) {
@ -1345,12 +1340,12 @@ impl<'db> PartialSpecialization<'_, 'db> {
/// specialization of a generic function.
pub(crate) struct SpecializationBuilder<'db> {
db: &'db dyn Db,
inferable: InferableTypeVars<'db, 'db>,
inferable: InferableTypeVars<'db>,
types: FxHashMap<BoundTypeVarIdentity<'db>, Type<'db>>,
}
impl<'db> SpecializationBuilder<'db> {
pub(crate) fn new(db: &'db dyn Db, inferable: InferableTypeVars<'db, 'db>) -> Self {
pub(crate) fn new(db: &'db dyn Db, inferable: InferableTypeVars<'db>) -> Self {
Self {
db,
inferable,

View File

@ -122,7 +122,7 @@ impl<'db> Type<'db> {
self,
db: &'db dyn Db,
protocol: ProtocolInstanceType<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -365,7 +365,7 @@ impl<'db> NominalInstanceType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -398,7 +398,7 @@ impl<'db> NominalInstanceType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
match (self.0, other.0) {
@ -420,7 +420,7 @@ impl<'db> NominalInstanceType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
) -> ConstraintSet<'db> {
@ -719,7 +719,7 @@ impl<'db> ProtocolInstanceType<'db> {
self,
db: &'db dyn Db,
other: Self,
_inferable: InferableTypeVars<'_, 'db>,
_inferable: InferableTypeVars<'db>,
_visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
if self == other {
@ -741,7 +741,7 @@ impl<'db> ProtocolInstanceType<'db> {
self,
_db: &'db dyn Db,
_other: Self,
_inferable: InferableTypeVars<'_, 'db>,
_inferable: InferableTypeVars<'db>,
_visitor: &IsDisjointVisitor<'db>,
) -> ConstraintSet<'db> {
ConstraintSet::from(false)

View File

@ -233,7 +233,7 @@ impl<'db> ProtocolInterface<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -608,7 +608,7 @@ impl<'a, 'db> ProtocolMember<'a, 'db> {
&self,
db: &'db dyn Db,
other: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
) -> ConstraintSet<'db> {
@ -633,7 +633,7 @@ impl<'a, 'db> ProtocolMember<'a, 'db> {
&self,
db: &'db dyn Db,
other: Type<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,

View File

@ -217,7 +217,7 @@ impl<'db> CallableSignature<'db> {
&self,
db: &'db dyn Db,
other: &Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
) -> ConstraintSet<'db> {
self.has_relation_to_impl(
db,
@ -233,7 +233,7 @@ impl<'db> CallableSignature<'db> {
&self,
db: &'db dyn Db,
other: &Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -255,7 +255,7 @@ impl<'db> CallableSignature<'db> {
db: &'db dyn Db,
self_signatures: &[Signature<'db>],
other_signatures: &[Signature<'db>],
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -321,7 +321,7 @@ impl<'db> CallableSignature<'db> {
&self,
db: &'db dyn Db,
other: &Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
match (self.overloads.as_slice(), other.overloads.as_slice()) {
@ -628,7 +628,7 @@ impl<'db> Signature<'db> {
}
}
fn inferable_typevars(&self, db: &'db dyn Db) -> InferableTypeVars<'db, 'db> {
fn inferable_typevars(&self, db: &'db dyn Db) -> InferableTypeVars<'db> {
match self.generic_context {
Some(generic_context) => generic_context.inferable_typevars(db),
None => InferableTypeVars::None,
@ -642,7 +642,7 @@ impl<'db> Signature<'db> {
&self,
db: &'db dyn Db,
other: &Signature<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
// The typevars in self and other should also be considered inferable when checking whether
@ -734,7 +734,7 @@ impl<'db> Signature<'db> {
&self,
db: &'db dyn Db,
other: &Signature<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,

View File

@ -136,7 +136,7 @@ impl<'db> SubclassOfType<'db> {
self,
db: &'db dyn Db,
other: SubclassOfType<'db>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -174,7 +174,7 @@ impl<'db> SubclassOfType<'db> {
self,
db: &'db dyn Db,
other: Self,
_inferable: InferableTypeVars<'_, 'db>,
_inferable: InferableTypeVars<'db>,
_visitor: &IsDisjointVisitor<'db>,
) -> ConstraintSet<'db> {
match (self.subclass_of, other.subclass_of) {

View File

@ -259,7 +259,7 @@ impl<'db> TupleType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -278,7 +278,7 @@ impl<'db> TupleType<'db> {
self,
db: &'db dyn Db,
other: Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
self.tuple(db)
@ -441,7 +441,7 @@ impl<'db> FixedLengthTuple<Type<'db>> {
&self,
db: &'db dyn Db,
other: &Tuple<Type<'db>>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -528,7 +528,7 @@ impl<'db> FixedLengthTuple<Type<'db>> {
&self,
db: &'db dyn Db,
other: &Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
ConstraintSet::from(self.0.len() == other.0.len()).and(db, || {
@ -798,7 +798,7 @@ impl<'db> VariableLengthTuple<Type<'db>> {
&self,
db: &'db dyn Db,
other: &Tuple<Type<'db>>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -977,7 +977,7 @@ impl<'db> VariableLengthTuple<Type<'db>> {
&self,
db: &'db dyn Db,
other: &Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
self.variable
@ -1190,7 +1190,7 @@ impl<'db> Tuple<Type<'db>> {
&self,
db: &'db dyn Db,
other: &Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
relation: TypeRelation<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
@ -1219,7 +1219,7 @@ impl<'db> Tuple<Type<'db>> {
&self,
db: &'db dyn Db,
other: &Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
visitor: &IsEquivalentVisitor<'db>,
) -> ConstraintSet<'db> {
match (self, other) {
@ -1239,7 +1239,7 @@ impl<'db> Tuple<Type<'db>> {
&self,
db: &'db dyn Db,
other: &Self,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
) -> ConstraintSet<'db> {
@ -1259,7 +1259,7 @@ impl<'db> Tuple<Type<'db>> {
db: &'db dyn Db,
a: impl IntoIterator<Item = &'s Type<'db>>,
b: impl IntoIterator<Item = &'s Type<'db>>,
inferable: InferableTypeVars<'_, 'db>,
inferable: InferableTypeVars<'db>,
disjointness_visitor: &IsDisjointVisitor<'db>,
relation_visitor: &HasRelationToVisitor<'db>,
) -> ConstraintSet<'db>