diff options
author | Aleksey Kladov <[email protected]> | 2021-06-13 14:42:34 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-06-13 14:42:34 +0100 |
commit | 6d104de15aee6a24a442871c59528c39d410c161 (patch) | |
tree | ae46a9d15e866b2887f24167152523ba3cef3a57 /crates/hir_def | |
parent | 39f190b72ccab9a166529f6ae1c8d5d562b15571 (diff) |
internal: refactor unresolved import diagnostic
Diffstat (limited to 'crates/hir_def')
-rw-r--r-- | crates/hir_def/src/nameres/tests/diagnostics.rs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs index 84d6fdc93..7b0f42004 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] |
16 | fn 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] | ||
29 | fn 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] | ||
53 | fn inactive_item() { | 16 | fn 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 | ||