From 3118891b18f5a55f564dc55b7ae5835e3827b1bf Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Thu, 24 Apr 2025 14:11:00 -0700 Subject: [PATCH] [red-knot] change TypeVarInstance to be interned, not tracked --- crates/red_knot_python_semantic/src/types.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/red_knot_python_semantic/src/types.rs b/crates/red_knot_python_semantic/src/types.rs index 44ce5f1561f08..27d3583cc859e 100644 --- a/crates/red_knot_python_semantic/src/types.rs +++ b/crates/red_knot_python_semantic/src/types.rs @@ -5230,11 +5230,7 @@ impl<'db> InvalidTypeExpression<'db> { /// typevar represents as an annotation: that is, an unknown set of objects, constrained by the /// upper-bound/constraints on this type var, defaulting to the default type of this type var when /// not otherwise bound to a type. -/// -/// This must be a tracked struct, not an interned one, because typevar equivalence is by identity, -/// not by value. Two typevars that have the same name, bound/constraints, and default, are still -/// different typevars: if used in the same scope, they may be bound to different types. -#[salsa::tracked(debug)] +#[salsa::interned(debug)] pub struct TypeVarInstance<'db> { /// The name of this TypeVar (e.g. `T`) #[return_ref]