diff options
author | Jonas Schievink <[email protected]> | 2021-05-12 00:01:51 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-05-12 00:01:51 +0100 |
commit | e78221bc58a050e8651f5be591561e7adf89c371 (patch) | |
tree | 191386e03f2975d927a093cc54bab52f37a7cbdf /crates/hir_expand/src/lib.rs | |
parent | c868414dcd50bbfe433cc93f8319d41e6742542c (diff) |
Remove delimiters from proc macro input
Diffstat (limited to 'crates/hir_expand/src/lib.rs')
-rw-r--r-- | crates/hir_expand/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index 5df11856e..88cb16ca4 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs | |||
@@ -272,6 +272,10 @@ impl MacroDefId { | |||
272 | }; | 272 | }; |
273 | Either::Left(*id) | 273 | Either::Left(*id) |
274 | } | 274 | } |
275 | |||
276 | pub fn is_proc_macro(&self) -> bool { | ||
277 | matches!(self.kind, MacroDefKind::ProcMacro(..)) | ||
278 | } | ||
275 | } | 279 | } |
276 | 280 | ||
277 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 281 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |