From 6f4f285f37c16e80b5fe7fbf8ec3bfe059e4b94a Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 18 Jan 2021 18:05:40 +0100 Subject: Remove `item_tree::Expr` It's empty and unused --- crates/hir_def/src/item_tree.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'crates/hir_def/src/item_tree.rs') diff --git a/crates/hir_def/src/item_tree.rs b/crates/hir_def/src/item_tree.rs index 9a433b61c..ff62928df 100644 --- a/crates/hir_def/src/item_tree.rs +++ b/crates/hir_def/src/item_tree.rs @@ -145,7 +145,6 @@ impl ItemTree { macro_calls, macro_rules, macro_defs, - exprs, vis, generics, } = &mut **data; @@ -167,7 +166,6 @@ impl ItemTree { macro_calls.shrink_to_fit(); macro_rules.shrink_to_fit(); macro_defs.shrink_to_fit(); - exprs.shrink_to_fit(); vis.arena.shrink_to_fit(); generics.arena.shrink_to_fit(); @@ -296,7 +294,6 @@ struct ItemTreeData { macro_calls: Arena, macro_rules: Arena, macro_defs: Arena, - exprs: Arena, vis: ItemVisibilities, generics: GenericParamsStorage, @@ -461,7 +458,7 @@ macro_rules! impl_index { }; } -impl_index!(fields: Field, variants: Variant, exprs: Expr); +impl_index!(fields: Field, variants: Variant); impl Index for ItemTree { type Output = RawVisibility; @@ -664,11 +661,6 @@ pub struct MacroDef { pub ast_id: FileAstId, } -// NB: There's no `FileAstId` for `Expr`. The only case where this would be useful is for array -// lengths, but we don't do much with them yet. -#[derive(Debug, Clone, Eq, PartialEq)] -pub struct Expr; - macro_rules! impl_froms { ($e:ident { $($v:ident ($t:ty)),* $(,)? }) => { $( -- cgit v1.2.3