From bda68e23328ca62a71da348a13c4d13cc8f991f3 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 12 May 2021 00:27:16 +0200 Subject: Strip delimiter from fn-like proc macro input --- crates/hir_expand/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/hir_expand/src/lib.rs') 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 { }; Either::Left(*id) } + + pub fn is_proc_macro(&self) -> bool { + matches!(self.kind, MacroDefKind::ProcMacro(..)) + } } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -- cgit v1.2.3