diff options
author | Brandon <[email protected]> | 2021-03-24 07:00:38 +0000 |
---|---|---|
committer | Brandon <[email protected]> | 2021-03-24 07:00:38 +0000 |
commit | 0d063b8d212dd6c54da0aa8608154c980107bd07 (patch) | |
tree | 4cc23ff0ac81534af54000927f0e22c910e2c680 /crates/hir_expand/src | |
parent | d702f10fb345637e82f3fb9606f5aba243df5365 (diff) |
Fix MISSING: command error with macros
Diffstat (limited to 'crates/hir_expand/src')
-rw-r--r-- | crates/hir_expand/src/lib.rs | 7 |
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)] |