mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-23 11:54:39 +00:00
Move a few more candidate rules to the deferred Binding
-only pass (#5853)
## Summary No behavior change, but this is in theory more efficient, since we can just iterate over the flat `Binding` vector rather than having to iterate over binding chains via the `Scope`.
This commit is contained in:
parent
626d8dc2cc
commit
1181d25e5a
5 changed files with 86 additions and 81 deletions
|
@ -17,6 +17,8 @@ use crate::ScopeId;
|
|||
pub struct Binding<'a> {
|
||||
pub kind: BindingKind<'a>,
|
||||
pub range: TextRange,
|
||||
/// The [`ScopeId`] of the scope in which the [`Binding`] was defined.
|
||||
pub scope: ScopeId,
|
||||
/// The context in which the [`Binding`] was created.
|
||||
pub context: ExecutionContext,
|
||||
/// The statement in which the [`Binding`] was defined.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue