diff options
author | Jonas Schievink <[email protected]> | 2021-05-11 23:27:16 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-05-11 23:27:16 +0100 |
commit | bda68e23328ca62a71da348a13c4d13cc8f991f3 (patch) | |
tree | ee4d8eb1b2ac748fe40dfcbc6c991b20c44191de /crates/hir_expand/src/lib.rs | |
parent | a328a6bc75e3832930bd22fb644a994dcd3d93ff (diff) |
Strip delimiter from fn-like 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)] |