aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/tests/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/nameres/tests/macros.rs')
-rw-r--r--crates/hir_def/src/nameres/tests/macros.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/crates/hir_def/src/nameres/tests/macros.rs b/crates/hir_def/src/nameres/tests/macros.rs
index 133b2d818..3065efd65 100644
--- a/crates/hir_def/src/nameres/tests/macros.rs
+++ b/crates/hir_def/src/nameres/tests/macros.rs
@@ -737,6 +737,7 @@ fn unresolved_attributes_fall_back_track_per_file_moditems() {
737 737
738#[test] 738#[test]
739fn unresolved_attrs_extern_block_hang() { 739fn unresolved_attrs_extern_block_hang() {
740 // Regression test for https://github.com/rust-analyzer/rust-analyzer/issues/8905
740 check( 741 check(
741 r#" 742 r#"
742#[unresolved] 743#[unresolved]
@@ -790,7 +791,22 @@ fn derive() {}
790 crate 791 crate
791 S: t v 792 S: t v
792 "#]], 793 "#]],
793 ) 794 );
795}
796
797#[test]
798fn unresolved_attr_with_cfg_attr_hang() {
799 // Another regression test for https://github.com/rust-analyzer/rust-analyzer/issues/8905
800 check(
801 r#"
802#[cfg_attr(not(off), unresolved, unresolved)]
803struct S;
804 "#,
805 expect![[r#"
806 crate
807 S: t v
808 "#]],
809 );
794} 810}
795 811
796#[test] 812#[test]