From 8ab7696acdc2f5ada5570a9ae0389a108fe19409 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 5 Oct 2020 23:41:16 +0200 Subject: Account for proc macro helpers when parsing attr --- crates/hir_def/src/nameres/tests/macros.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/hir_def/src/nameres/tests') diff --git a/crates/hir_def/src/nameres/tests/macros.rs b/crates/hir_def/src/nameres/tests/macros.rs index 0851c3b7d..305fca0f9 100644 --- a/crates/hir_def/src/nameres/tests/macros.rs +++ b/crates/hir_def/src/nameres/tests/macros.rs @@ -688,13 +688,20 @@ fn resolves_proc_macros() { pub fn derive_macro(_item: TokenStream) -> TokenStream { TokenStream } + + #[proc_macro_derive(AnotherTrait, attributes(helper_attr))] + pub fn derive_macro_2(_item: TokenStream) -> TokenStream { + TokenStream + } ", expect![[r#" crate + AnotherTrait: m DummyTrait: m TokenStream: t v attribute_macro: v m derive_macro: v + derive_macro_2: v function_like_macro: v m "#]], ); -- cgit v1.2.3