diff options
Diffstat (limited to 'crates/hir_def/src/nameres/tests.rs')
-rw-r--r-- | crates/hir_def/src/nameres/tests.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/tests.rs b/crates/hir_def/src/nameres/tests.rs index 11d84f808..9c19bf572 100644 --- a/crates/hir_def/src/nameres/tests.rs +++ b/crates/hir_def/src/nameres/tests.rs | |||
@@ -691,3 +691,20 @@ mod tr { | |||
691 | "#]], | 691 | "#]], |
692 | ); | 692 | ); |
693 | } | 693 | } |
694 | |||
695 | #[test] | ||
696 | fn cfg_the_entire_crate() { | ||
697 | check( | ||
698 | r#" | ||
699 | //- /main.rs | ||
700 | #![cfg(never)] | ||
701 | |||
702 | pub struct S; | ||
703 | pub enum E {} | ||
704 | pub fn f() {} | ||
705 | "#, | ||
706 | expect![[r#" | ||
707 | crate | ||
708 | "#]], | ||
709 | ); | ||
710 | } | ||