Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expr.rs')
| -rw-r--r-- | crates/hir-def/src/expr.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/hir-def/src/expr.rs b/crates/hir-def/src/expr.rs index c25aa0bcaf..a991365d6b 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; +use la_arena::{Idx, RawIdx}; use crate::{ builtin_type::{BuiltinFloat, BuiltinInt, BuiltinUint}, @@ -27,6 +27,11 @@ pub use syntax::ast::{ArithOp, BinaryOp, CmpOp, LogicOp, Ordering, RangeOp, Unar pub type ExprId = Idx<Expr>; +/// FIXME: this is a hacky function which should be removed +pub(crate) fn dummy_expr_id() -> ExprId { + ExprId::from_raw(RawIdx::from(u32::MAX)) +} + pub type PatId = Idx<Pat>; #[derive(Debug, Clone, Eq, PartialEq)] |