mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:41:23 +00:00
[ty] Use an interval map for scopes by expression (#19025)
This commit is contained in:
parent
f22da352db
commit
3560f86450
4 changed files with 136 additions and 22 deletions
|
@ -49,6 +49,16 @@ impl NodeIndex {
|
|||
pub fn as_usize(self) -> usize {
|
||||
self.0 as _
|
||||
}
|
||||
|
||||
pub fn as_u32(self) -> u32 {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u32> for NodeIndex {
|
||||
fn from(value: u32) -> Self {
|
||||
NodeIndex(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u32> for AtomicNodeIndex {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue