From 1d103cf087c574f66279490ffef8c76178aea5cc Mon Sep 17 00:00:00 2001 From: Aramis Razzaghipour Date: Fri, 15 Jan 2021 11:02:08 +1100 Subject: =?UTF-8?q?Use=20=E2=80=98index=E2=80=99=20terminology=20for=20are?= =?UTF-8?q?na=20consistently?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/hir_def/src/expr.rs | 4 ++-- crates/hir_def/src/item_tree.rs | 2 +- crates/hir_def/src/item_tree/lower.rs | 4 ++-- crates/hir_def/src/trace.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/hir_def') diff --git a/crates/hir_def/src/expr.rs b/crates/hir_def/src/expr.rs index a293df9f1..5be838f4a 100644 --- a/crates/hir_def/src/expr.rs +++ b/crates/hir_def/src/expr.rs @@ -13,7 +13,7 @@ //! See also a neighboring `body` module. use hir_expand::name::Name; -use la_arena::{Idx, RawId}; +use la_arena::{Idx, RawIdx}; use syntax::ast::RangeOp; use crate::{ @@ -24,7 +24,7 @@ use crate::{ pub type ExprId = Idx; pub(crate) fn dummy_expr_id() -> ExprId { - ExprId::from_raw(RawId::from(!0)) + ExprId::from_raw(RawIdx::from(!0)) } pub type PatId = Idx; diff --git a/crates/hir_def/src/item_tree.rs b/crates/hir_def/src/item_tree.rs index 91e42aa0d..9a433b61c 100644 --- a/crates/hir_def/src/item_tree.rs +++ b/crates/hir_def/src/item_tree.rs @@ -20,7 +20,7 @@ use hir_expand::{ name::{name, AsName, Name}, HirFileId, InFile, }; -use la_arena::{Arena, Idx, RawId}; +use la_arena::{Arena, Idx, RawIdx}; use rustc_hash::FxHashMap; use smallvec::SmallVec; use syntax::{ast, match_ast}; diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs index 3b206ef85..5e71ca42c 100644 --- a/crates/hir_def/src/item_tree/lower.rs +++ b/crates/hir_def/src/item_tree/lower.rs @@ -683,12 +683,12 @@ impl Ctx { } fn next_field_idx(&self) -> Idx { - Idx::from_raw(RawId::from( + Idx::from_raw(RawIdx::from( self.tree.data.as_ref().map_or(0, |data| data.fields.len() as u32), )) } fn next_variant_idx(&self) -> Idx { - Idx::from_raw(RawId::from( + Idx::from_raw(RawIdx::from( self.tree.data.as_ref().map_or(0, |data| data.variants.len() as u32), )) } 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 @@ //! 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 { arena: Option>, @@ -30,7 +30,7 @@ impl Trace { let id = if let Some(arena) = &mut self.arena { arena.alloc(data()) } else { - let id = Idx::::from_raw(RawId::from(self.len)); + let id = Idx::::from_raw(RawIdx::from(self.len)); self.len += 1; id }; -- cgit v1.2.3