aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/item_tree.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-01-18 17:05:40 +0000
committerJonas Schievink <[email protected]>2021-01-18 17:05:40 +0000
commit6f4f285f37c16e80b5fe7fbf8ec3bfe059e4b94a (patch)
treeff2c7a66940a01a85dbea1f534b93e9eea9ab49b /crates/hir_def/src/item_tree.rs
parent9daba961f236750c3a5d831c9775606271b37eff (diff)
Remove `item_tree::Expr`
It's empty and unused
Diffstat (limited to 'crates/hir_def/src/item_tree.rs')
-rw-r--r--crates/hir_def/src/item_tree.rs10
1 files changed, 1 insertions, 9 deletions
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 {
145 macro_calls, 145 macro_calls,
146 macro_rules, 146 macro_rules,
147 macro_defs, 147 macro_defs,
148 exprs,
149 vis, 148 vis,
150 generics, 149 generics,
151 } = &mut **data; 150 } = &mut **data;
@@ -167,7 +166,6 @@ impl ItemTree {
167 macro_calls.shrink_to_fit(); 166 macro_calls.shrink_to_fit();
168 macro_rules.shrink_to_fit(); 167 macro_rules.shrink_to_fit();
169 macro_defs.shrink_to_fit(); 168 macro_defs.shrink_to_fit();
170 exprs.shrink_to_fit();
171 169
172 vis.arena.shrink_to_fit(); 170 vis.arena.shrink_to_fit();
173 generics.arena.shrink_to_fit(); 171 generics.arena.shrink_to_fit();
@@ -296,7 +294,6 @@ struct ItemTreeData {
296 macro_calls: Arena<MacroCall>, 294 macro_calls: Arena<MacroCall>,
297 macro_rules: Arena<MacroRules>, 295 macro_rules: Arena<MacroRules>,
298 macro_defs: Arena<MacroDef>, 296 macro_defs: Arena<MacroDef>,
299 exprs: Arena<Expr>,
300 297
301 vis: ItemVisibilities, 298 vis: ItemVisibilities,
302 generics: GenericParamsStorage, 299 generics: GenericParamsStorage,
@@ -461,7 +458,7 @@ macro_rules! impl_index {
461 }; 458 };
462} 459}
463 460
464impl_index!(fields: Field, variants: Variant, exprs: Expr); 461impl_index!(fields: Field, variants: Variant);
465 462
466impl Index<RawVisibilityId> for ItemTree { 463impl Index<RawVisibilityId> for ItemTree {
467 type Output = RawVisibility; 464 type Output = RawVisibility;
@@ -664,11 +661,6 @@ pub struct MacroDef {
664 pub ast_id: FileAstId<ast::MacroDef>, 661 pub ast_id: FileAstId<ast::MacroDef>,
665} 662}
666 663
667// NB: There's no `FileAstId` for `Expr`. The only case where this would be useful is for array
668// lengths, but we don't do much with them yet.
669#[derive(Debug, Clone, Eq, PartialEq)]
670pub struct Expr;
671
672macro_rules! impl_froms { 664macro_rules! impl_froms {
673 ($e:ident { $($v:ident ($t:ty)),* $(,)? }) => { 665 ($e:ident { $($v:ident ($t:ty)),* $(,)? }) => {
674 $( 666 $(