diff --git a/crates/ty_python_semantic/src/types/generics.rs b/crates/ty_python_semantic/src/types/generics.rs index 5780b9e9ce..167760bc8a 100644 --- a/crates/ty_python_semantic/src/types/generics.rs +++ b/crates/ty_python_semantic/src/types/generics.rs @@ -1672,7 +1672,7 @@ impl<'db> SpecializationBuilder<'db> { let upper = IntersectionType::from_elements( self.db, - std::iter::chain(bounds.upper, [bound]), + bounds.upper.into_iter().chain([bound]), ); if upper != bound { self.add_type_mapping(bound_typevar, upper, variance, &mut f);