mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Use ‘index’ terminology for arena consistently
This commit is contained in:
parent
3224ecea87
commit
1d103cf087
6 changed files with 56 additions and 53 deletions
|
@ -9,7 +9,7 @@
|
|||
//! absolute offsets. The `Trace` structure (inspired, at least in name, by
|
||||
//! Kotlin's `BindingTrace`) allows use the same code to compute both
|
||||
//! projections.
|
||||
use la_arena::{Arena, ArenaMap, Idx, RawId};
|
||||
use la_arena::{Arena, ArenaMap, Idx, RawIdx};
|
||||
|
||||
pub(crate) struct Trace<T, V> {
|
||||
arena: Option<Arena<T>>,
|
||||
|
@ -30,7 +30,7 @@ impl<T, V> Trace<T, V> {
|
|||
let id = if let Some(arena) = &mut self.arena {
|
||||
arena.alloc(data())
|
||||
} else {
|
||||
let id = Idx::<T>::from_raw(RawId::from(self.len));
|
||||
let id = Idx::<T>::from_raw(RawIdx::from(self.len));
|
||||
self.len += 1;
|
||||
id
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue