diff --git a/crates/red_knot_python_semantic/src/semantic_index/use_def/symbol_state.rs b/crates/red_knot_python_semantic/src/semantic_index/use_def/symbol_state.rs index 28fe84e77c26f0..fd62271ccda1f4 100644 --- a/crates/red_knot_python_semantic/src/semantic_index/use_def/symbol_state.rs +++ b/crates/red_knot_python_semantic/src/semantic_index/use_def/symbol_state.rs @@ -36,9 +36,9 @@ //! dominates, but it does dominate the `x = 1 if flag2 else None` definition, so we have to keep //! track of that. //! -//! The data structures used here ([`BitSet`] and [`BitSetArray`]) optimize for keeping all data -//! inline (avoiding lots of scattered allocations) in small-to-medium cases, and falling back to -//! heap allocation to be able to scale to arbitrary numbers of definitions and constraints when +//! The data structures used here ([`BitSet`] and [`smallvec::SmallVec`]) optimize for keeping all +//! data inline (avoiding lots of scattered allocations) in small-to-medium cases, and falling back +//! to heap allocation to be able to scale to arbitrary numbers of definitions and constraints when //! needed. use super::bitset::{BitSet, BitSetIterator}; use ruff_index::newtype_index; @@ -65,7 +65,7 @@ const INLINE_CONSTRAINT_BLOCKS: usize = 2; /// Can keep inline this many visible definitions per symbol at a given time; more will go to heap. const INLINE_VISIBLE_DEFINITIONS_PER_SYMBOL: usize = 4; -/// A [`BitSetArray`];one [`BitSet`] of applicable [`ScopedConstraintId`] per visible definition. +/// One [`BitSet`] of applicable [`ScopedConstraintId`] per visible definition. type Constraints = SmallVec<[BitSet; INLINE_VISIBLE_DEFINITIONS_PER_SYMBOL]>; type ConstraintsIterator<'a> = std::slice::Iter<'a, BitSet>; @@ -78,7 +78,7 @@ pub(super) struct SymbolState { /// For each definition, which [`ScopedConstraintId`] apply? /// - /// This is a [`BitSetArray`] which should always have one [`BitSet`] of constraints per + /// This is a [`smallvec::SmallVec`] which should always have one [`BitSet`] of constraints per /// definition in `visible_definitions`. constraints: Constraints,