aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_expand/src/lib.rs')
-rw-r--r--crates/ra_hir_expand/src/lib.rs13
1 files changed, 2 insertions, 11 deletions
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 {
117#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 117#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
118pub struct MacroFile { 118pub struct MacroFile {
119 macro_call_id: MacroCallId, 119 macro_call_id: MacroCallId,
120 macro_file_kind: MacroFileKind,
121}
122
123#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
124pub enum MacroFileKind {
125 Items,
126 Expr,
127 Statements,
128} 120}
129 121
130/// `MacroCallId` identifies a particular macro invocation, like 122/// `MacroCallId` identifies a particular macro invocation, like
@@ -205,9 +197,8 @@ impl MacroCallKind {
205} 197}
206 198
207impl MacroCallId { 199impl MacroCallId {
208 pub fn as_file(self, kind: MacroFileKind) -> HirFileId { 200 pub fn as_file(self) -> HirFileId {
209 let macro_file = MacroFile { macro_call_id: self, macro_file_kind: kind }; 201 MacroFile { macro_call_id: self }.into()
210 macro_file.into()
211 } 202 }
212} 203}
213 204