Skip to content

Commit deaa45e

Browse files
committed
remove unnecessary call to find_legacy_typevars
1 parent 8d620df commit deaa45e

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

crates/ty_python_semantic/src/types/class.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,6 @@ impl<'db> GenericAlias<'db> {
273273
db: &'db dyn Db,
274274
typevars: &mut FxOrderSet<TypeVarInstance<'db>>,
275275
) {
276-
// A tuple's specialization will include all of its element types, so we don't need to also
277-
// look in `self.tuple`.
278276
self.specialization(db).find_legacy_typevars(db, typevars);
279277
}
280278

crates/ty_python_semantic/src/types/generics.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,9 +681,8 @@ impl<'db> Specialization<'db> {
681681
for ty in self.types(db) {
682682
ty.find_legacy_typevars(db, typevars);
683683
}
684-
if let Some(t) = self.tuple_inner(db) {
685-
t.find_legacy_typevars(db, typevars);
686-
}
684+
// A tuple's specialization will include all of its element types, so we don't need to also
685+
// look in `self.tuple`.
687686
}
688687
}
689688

crates/ty_python_semantic/src/types/tuple.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![expect(dead_code)]
12
//! Types describing fixed- and variable-length tuples.
23
//!
34
//! At runtime, a Python tuple is a fixed-length immutable list of values. There is no restriction

0 commit comments

Comments
 (0)