X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=crates%2Fhir_def%2Fsrc%2Fexpr.rs;h=5be838f4a7d842ae7fb45011eebadae56e5ea011;hb=1d103cf087c574f66279490ffef8c76178aea5cc;hp=e5d740a3653a46f861371ac995aa72b31b1107a9;hpb=3877421373ef1439e53b7f7274865af287dbb47f;p=rust.git diff --git a/crates/hir_def/src/expr.rs b/crates/hir_def/src/expr.rs index e5d740a3653..5be838f4a7d 100644 --- a/crates/hir_def/src/expr.rs +++ b/crates/hir_def/src/expr.rs @@ -1,6 +1,6 @@ //! This module describes hir-level representation of expressions. //! -//! This representaion is: +//! This representation is: //! //! 1. Identity-based. Each expression has an `id`, so we can distinguish //! between different `1` in `1 + 1`. @@ -12,8 +12,8 @@ //! //! See also a neighboring `body` module. -use arena::{Idx, RawId}; use hir_expand::name::Name; +use la_arena::{Idx, RawIdx}; use syntax::ast::RangeOp; use crate::{ @@ -24,11 +24,17 @@ 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; +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct Label { + pub name: Name, +} +pub type LabelId = Idx