From 26c869ddc0cefc81899dceafb2bf14c66e1c5c54 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 10 Jun 2021 00:25:36 +0200 Subject: Don't classify attributes on macro-calls are the macro itself --- crates/ide/src/references.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'crates/ide/src/references.rs') diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index ae492a264..f8b64a669 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -1380,4 +1380,24 @@ lib::foo!(); "#]], ); } + + #[test] + fn macro_doesnt_reference_attribute_on_call() { + check( + r#" +macro_rules! m { + () => {}; +} + +#[proc_macro_test::attr_noop] +m$0!(); + +"#, + expect![[r#" + m Macro FileId(0) 0..32 13..14 + + FileId(0) 64..65 + "#]], + ); + } } -- cgit v1.2.3