mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
[red-knot] Internal refactoring of visibility constraints API (#15913)
This extracts some pure refactoring noise from https://github.com/astral-sh/ruff/pull/15861. This changes the API for creating and evaluating visibility constraints, but does not change how they are respresented internally. There should be no behavioral or performance changes in this PR. Changes: - Hide the internal representation isn't changed, so that we can make changes to it in #15861. - Add a separate builder type for visibility constraints. (With TDDs, we will have some additional builder state that we can throw away once we're done constructing.) - Remove a layer of helper methods from `UseDefMapBuilder`, making `SemanticIndexBuilder` responsible for constructing whatever visibility constraints it needs.
This commit is contained in:
parent
102c2eec12
commit
0529ad67d7
5 changed files with 160 additions and 105 deletions
|
@ -32,7 +32,7 @@ mod use_def;
|
|||
|
||||
pub(crate) use self::use_def::{
|
||||
BindingWithConstraints, BindingWithConstraintsIterator, DeclarationWithConstraint,
|
||||
DeclarationsIterator, ScopedVisibilityConstraintId,
|
||||
DeclarationsIterator,
|
||||
};
|
||||
|
||||
type SymbolMap = hashbrown::HashMap<ScopedSymbolId, (), FxBuildHasher>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue