aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/nameres/tests')
-rw-r--r--crates/hir_def/src/nameres/tests/macros.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/tests/macros.rs b/crates/hir_def/src/nameres/tests/macros.rs
index 04de107f5..133b2d818 100644
--- a/crates/hir_def/src/nameres/tests/macros.rs
+++ b/crates/hir_def/src/nameres/tests/macros.rs
@@ -736,6 +736,42 @@ fn unresolved_attributes_fall_back_track_per_file_moditems() {
736} 736}
737 737
738#[test] 738#[test]
739fn unresolved_attrs_extern_block_hang() {
740 check(
741 r#"
742#[unresolved]
743extern "C" {
744 #[unresolved]
745 fn f();
746}
747 "#,
748 expect![[r#"
749 crate
750 f: v
751 "#]],
752 );
753}
754
755#[test]
756fn macros_in_extern_block() {
757 check(
758 r#"
759macro_rules! m {
760 () => { static S: u8; };
761}
762
763extern {
764 m!();
765}
766 "#,
767 expect![[r#"
768 crate
769 S: v
770 "#]],
771 );
772}
773
774#[test]
739fn resolves_derive_helper() { 775fn resolves_derive_helper() {
740 cov_mark::check!(resolved_derive_helper); 776 cov_mark::check!(resolved_derive_helper);
741 check( 777 check(