aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/trace.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-17 08:01:20 +0000
committerGitHub <[email protected]>2021-01-17 08:01:20 +0000
commit93e189604916a64423c5722c2b95722b79fec0cd (patch)
tree8c1fbb02902eb1f77500eb2f328da8c17f06510e /crates/hir_def/src/trace.rs
parent3224ecea8734f850eda474c136ae4dcb7e1aa3f1 (diff)
parent1d103cf087c574f66279490ffef8c76178aea5cc (diff)
Merge #7275
7275: Make arena index vs ID naming consistent r=matklad a=arzg This makes naming consistent with `la_arena::RawId`. Alternatively, la-arena’s documentation could be updated to use ‘index’ terminology instead of ‘ID’ terminology, and `RawId` renamed to `RawIdx`. This pull request doesn’t compile because dependencies on la-arena go through crates.io, so existing dependencies on the crate are referencing an old version. As such, this PR will only compile once a new la-arena version has been published. Co-authored-by: Aramis Razzaghipour <[email protected]>
Diffstat (limited to 'crates/hir_def/src/trace.rs')
-rw-r--r--crates/hir_def/src/trace.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_def/src/trace.rs b/crates/hir_def/src/trace.rs
index 18d16986b..6e6ceb8e4 100644
--- a/crates/hir_def/src/trace.rs
+++ b/crates/hir_def/src/trace.rs
@@ -9,7 +9,7 @@
9//! absolute offsets. The `Trace` structure (inspired, at least in name, by 9//! absolute offsets. The `Trace` structure (inspired, at least in name, by
10//! Kotlin's `BindingTrace`) allows use the same code to compute both 10//! Kotlin's `BindingTrace`) allows use the same code to compute both
11//! projections. 11//! projections.
12use la_arena::{Arena, ArenaMap, Idx, RawId}; 12use la_arena::{Arena, ArenaMap, Idx, RawIdx};
13 13
14pub(crate) struct Trace<T, V> { 14pub(crate) struct Trace<T, V> {
15 arena: Option<Arena<T>>, 15 arena: Option<Arena<T>>,
@@ -30,7 +30,7 @@ impl<T, V> Trace<T, V> {
30 let id = if let Some(arena) = &mut self.arena { 30 let id = if let Some(arena) = &mut self.arena {
31 arena.alloc(data()) 31 arena.alloc(data())
32 } else { 32 } else {
33 let id = Idx::<T>::from_raw(RawId::from(self.len)); 33 let id = Idx::<T>::from_raw(RawIdx::from(self.len));
34 self.len += 1; 34 self.len += 1;
35 id 35 id
36 }; 36 };