Skip to content

Commit 1dc9a1b

Browse files
committed
remove unnecessary call to find_legacy_typevars
1 parent e5550dc commit 1dc9a1b

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
@@ -253,8 +253,6 @@ impl<'db> GenericAlias<'db> {
253253
db: &'db dyn Db,
254254
typevars: &mut FxOrderSet<TypeVarInstance<'db>>,
255255
) {
256-
// A tuple's specialization will include all of its element types, so we don't need to also
257-
// look in `self.tuple`.
258256
self.specialization(db).find_legacy_typevars(db, typevars);
259257
}
260258

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)