diff options
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)] |