aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/lib.rs
diff options
context:
space:
mode:
authorBrandon <[email protected]>2021-03-24 07:00:38 +0000
committerBrandon <[email protected]>2021-03-24 07:00:38 +0000
commit0d063b8d212dd6c54da0aa8608154c980107bd07 (patch)
tree4cc23ff0ac81534af54000927f0e22c910e2c680 /crates/hir_expand/src/lib.rs
parentd702f10fb345637e82f3fb9606f5aba243df5365 (diff)
Fix MISSING: command error with macros
Diffstat (limited to 'crates/hir_expand/src/lib.rs')
-rw-r--r--crates/hir_expand/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs
index b8045fda9..d7391ebad 100644
--- a/crates/hir_expand/src/lib.rs
+++ b/crates/hir_expand/src/lib.rs
@@ -207,6 +207,13 @@ impl HirFileId {
207 } 207 }
208 false 208 false
209 } 209 }
210
211 pub fn is_macro_file(&self) -> bool {
212 match self.0 {
213 HirFileIdRepr::MacroFile(_) => true,
214 HirFileIdRepr::FileId(_) => false,
215 }
216 }
210} 217}
211 218
212#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 219#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]