diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-05 22:42:06 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-05 22:42:06 +0100 |
commit | 3fc7338dcb8af4bc8771ae319ae0dd1612fa9013 (patch) | |
tree | 126f2c9e8f68eb1f8e4876f4a71117508a1a1e4b /crates/hir_def/src/nameres/tests | |
parent | 44587d1bfcc40839135451e620b6f80cbfd401e5 (diff) | |
parent | 8ab7696acdc2f5ada5570a9ae0389a108fe19409 (diff) |
Merge #6143
6143: Account for proc macro helpers when parsing attr r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6138
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/nameres/tests')
-rw-r--r-- | crates/hir_def/src/nameres/tests/macros.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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() { | |||
688 | pub fn derive_macro(_item: TokenStream) -> TokenStream { | 688 | pub fn derive_macro(_item: TokenStream) -> TokenStream { |
689 | TokenStream | 689 | TokenStream |
690 | } | 690 | } |
691 | |||
692 | #[proc_macro_derive(AnotherTrait, attributes(helper_attr))] | ||
693 | pub fn derive_macro_2(_item: TokenStream) -> TokenStream { | ||
694 | TokenStream | ||
695 | } | ||
691 | ", | 696 | ", |
692 | expect![[r#" | 697 | expect![[r#" |
693 | crate | 698 | crate |
699 | AnotherTrait: m | ||
694 | DummyTrait: m | 700 | DummyTrait: m |
695 | TokenStream: t v | 701 | TokenStream: t v |
696 | attribute_macro: v m | 702 | attribute_macro: v m |
697 | derive_macro: v | 703 | derive_macro: v |
704 | derive_macro_2: v | ||
698 | function_like_macro: v m | 705 | function_like_macro: v m |
699 | "#]], | 706 | "#]], |
700 | ); | 707 | ); |