From 509fedd9d2f228c6dca762cbf06c31af34ac0c75 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sun, 8 Dec 2019 16:16:52 +0800 Subject: Remove MacroFileKind --- crates/ra_hir_expand/src/lib.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'crates/ra_hir_expand/src/lib.rs') diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index 0a5da7e54..94e1e466a 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs @@ -117,14 +117,6 @@ impl HirFileId { #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct MacroFile { macro_call_id: MacroCallId, - macro_file_kind: MacroFileKind, -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub enum MacroFileKind { - Items, - Expr, - Statements, } /// `MacroCallId` identifies a particular macro invocation, like @@ -205,9 +197,8 @@ impl MacroCallKind { } impl MacroCallId { - pub fn as_file(self, kind: MacroFileKind) -> HirFileId { - let macro_file = MacroFile { macro_call_id: self, macro_file_kind: kind }; - macro_file.into() + pub fn as_file(self) -> HirFileId { + MacroFile { macro_call_id: self }.into() } } -- cgit v1.2.3