mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
[ty] Update salsa (#22072)
This commit is contained in:
@@ -9313,7 +9313,7 @@ impl<'db> TypeAndQualifiers<'db> {
|
||||
/// Error struct providing information on type(s) that were deemed to be invalid
|
||||
/// in a type expression context, and the type we should therefore fallback to
|
||||
/// for the problematic type expression.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash, get_size2::GetSize)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash, get_size2::GetSize, salsa::Update)]
|
||||
pub struct InvalidTypeExpressionError<'db> {
|
||||
fallback_type: Type<'db>,
|
||||
invalid_expressions: smallvec::SmallVec<[InvalidTypeExpression<'db>; 1]>,
|
||||
@@ -9344,7 +9344,7 @@ impl<'db> InvalidTypeExpressionError<'db> {
|
||||
}
|
||||
|
||||
/// Enumeration of various types that are invalid in type-expression contexts
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, get_size2::GetSize)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, get_size2::GetSize, salsa::Update)]
|
||||
enum InvalidTypeExpression<'db> {
|
||||
/// Some types always require exactly one argument when used in a type expression
|
||||
RequiresOneArgument(SpecialFormType),
|
||||
|
||||
@@ -180,7 +180,7 @@ impl<'db> BoundSuperError<'db> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, get_size2::GetSize)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, get_size2::GetSize, salsa::Update)]
|
||||
pub enum SuperOwnerKind<'db> {
|
||||
Dynamic(DynamicType<'db>),
|
||||
Class(ClassType<'db>),
|
||||
|
||||
@@ -2656,7 +2656,7 @@ fn sequent_map_cycle_initial<'db>(
|
||||
|
||||
/// An assignment of one BDD variable to either `true` or `false`. (When evaluating a BDD, we
|
||||
/// must provide an assignment for each variable present in the BDD.)
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, salsa::Update)]
|
||||
pub(crate) enum ConstraintAssignment<'db> {
|
||||
Positive(ConstrainedTypeVar<'db>),
|
||||
Negative(ConstrainedTypeVar<'db>),
|
||||
|
||||
@@ -354,7 +354,7 @@ pub(super) struct ExpressionWithContext<'db> {
|
||||
///
|
||||
/// Knowing the outer type context when inferring an expression can enable
|
||||
/// more precise inference results, aka "bidirectional type inference".
|
||||
#[derive(Default, Copy, Clone, Debug, PartialEq, Eq, Hash, get_size2::GetSize)]
|
||||
#[derive(Default, Copy, Clone, Debug, PartialEq, Eq, Hash, get_size2::GetSize, salsa::Update)]
|
||||
pub(crate) struct TypeContext<'db> {
|
||||
pub(crate) annotation: Option<Type<'db>>,
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ pub(crate) type TupleSpec<'db> = Tuple<Type<'db>>;
|
||||
///
|
||||
/// Our tuple representation can hold instances of any Rust type. For tuples containing Python
|
||||
/// types, use [`TupleSpec`], which defines some additional type-specific methods.
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, get_size2::GetSize)]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, get_size2::GetSize, salsa::Update)]
|
||||
pub struct FixedLengthTuple<T>(Box<[T]>);
|
||||
|
||||
impl<T> FixedLengthTuple<T> {
|
||||
@@ -635,7 +635,7 @@ impl<'db> PySlice<'db> for FixedLengthTuple<Type<'db>> {
|
||||
///
|
||||
/// Our tuple representation can hold instances of any Rust type. For tuples containing Python
|
||||
/// types, use [`TupleSpec`], which defines some additional type-specific methods.
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, get_size2::GetSize)]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, get_size2::GetSize, salsa::Update)]
|
||||
pub struct VariableLengthTuple<T> {
|
||||
pub(crate) prefix: Box<[T]>,
|
||||
pub(crate) variable: T,
|
||||
@@ -1191,7 +1191,7 @@ impl<'db> PyIndex<'db> for &VariableLengthTuple<Type<'db>> {
|
||||
///
|
||||
/// Our tuple representation can hold instances of any Rust type. For tuples containing Python
|
||||
/// types, use [`TupleSpec`], which defines some additional type-specific methods.
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, get_size2::GetSize)]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, get_size2::GetSize, salsa::Update)]
|
||||
pub enum Tuple<T> {
|
||||
Fixed(FixedLengthTuple<T>),
|
||||
Variable(VariableLengthTuple<T>),
|
||||
|
||||
Reference in New Issue
Block a user