aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r--crates/hir_def/src/nameres/tests/diagnostics.rs68
1 files changed, 0 insertions, 68 deletions
diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs
index 84d6fdc93..5a088b6e5 100644
--- a/crates/hir_def/src/nameres/tests/diagnostics.rs
+++ b/crates/hir_def/src/nameres/tests/diagnostics.rs
@@ -13,43 +13,6 @@ fn check_no_diagnostics(ra_fixture: &str) {
13} 13}
14 14
15#[test] 15#[test]
16fn unresolved_import() {
17 check_diagnostics(
18 r"
19 use does_exist;
20 use does_not_exist;
21 //^^^^^^^^^^^^^^^^^^^ UnresolvedImport
22
23 mod does_exist {}
24 ",
25 );
26}
27
28#[test]
29fn dedup_unresolved_import_from_unresolved_crate() {
30 check_diagnostics(
31 r"
32 //- /main.rs crate:main
33 mod a {
34 extern crate doesnotexist;
35 //^^^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedExternCrate
36
37 // Should not error, since we already errored for the missing crate.
38 use doesnotexist::{self, bla, *};
39
40 use crate::doesnotexist;
41 //^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedImport
42 }
43
44 mod m {
45 use super::doesnotexist;
46 //^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedImport
47 }
48 ",
49 );
50}
51
52#[test]
53fn inactive_item() { 16fn inactive_item() {
54 // Additional tests in `cfg` crate. This only tests disabled cfgs. 17 // Additional tests in `cfg` crate. This only tests disabled cfgs.
55 18
@@ -92,37 +55,6 @@ fn inactive_via_cfg_attr() {
92} 55}
93 56
94#[test] 57#[test]
95fn unresolved_legacy_scope_macro() {
96 check_diagnostics(
97 r#"
98 //- /lib.rs
99 macro_rules! m { () => {} }
100
101 m!();
102 m2!();
103 //^^^^^^ UnresolvedMacroCall
104 "#,
105 );
106}
107
108#[test]
109fn unresolved_module_scope_macro() {
110 check_diagnostics(
111 r#"
112 //- /lib.rs
113 mod mac {
114 #[macro_export]
115 macro_rules! m { () => {} }
116 }
117
118 self::m!();
119 self::m2!();
120 //^^^^^^^^^^^^ UnresolvedMacroCall
121 "#,
122 );
123}
124
125#[test]
126fn builtin_macro_fails_expansion() { 58fn builtin_macro_fails_expansion() {
127 check_diagnostics( 59 check_diagnostics(
128 r#" 60 r#"