diff options
Diffstat (limited to 'crates/hir_def/src/nameres/tests/macros.rs')
-rw-r--r-- | crates/hir_def/src/nameres/tests/macros.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/tests/macros.rs b/crates/hir_def/src/nameres/tests/macros.rs index 6eb5f97be..04de107f5 100644 --- a/crates/hir_def/src/nameres/tests/macros.rs +++ b/crates/hir_def/src/nameres/tests/macros.rs | |||
@@ -736,6 +736,28 @@ fn unresolved_attributes_fall_back_track_per_file_moditems() { | |||
736 | } | 736 | } |
737 | 737 | ||
738 | #[test] | 738 | #[test] |
739 | fn resolves_derive_helper() { | ||
740 | cov_mark::check!(resolved_derive_helper); | ||
741 | check( | ||
742 | r#" | ||
743 | //- /main.rs crate:main deps:proc | ||
744 | #[derive(proc::Derive)] | ||
745 | #[helper] | ||
746 | #[unresolved] | ||
747 | struct S; | ||
748 | |||
749 | //- /proc.rs crate:proc | ||
750 | #[proc_macro_derive(Derive, attributes(helper))] | ||
751 | fn derive() {} | ||
752 | "#, | ||
753 | expect![[r#" | ||
754 | crate | ||
755 | S: t v | ||
756 | "#]], | ||
757 | ) | ||
758 | } | ||
759 | |||
760 | #[test] | ||
739 | fn macro_expansion_overflow() { | 761 | fn macro_expansion_overflow() { |
740 | cov_mark::check!(macro_expansion_overflow); | 762 | cov_mark::check!(macro_expansion_overflow); |
741 | check( | 763 | check( |