aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-13 14:06:27 +0100
committerGitHub <[email protected]>2021-06-13 14:06:27 +0100
commite6fa9b016fab4bf38f4e2a798fcabcc13b58e9ab (patch)
tree3e01ba8fb758b685abc4ea0fa162aa48aa81efd5 /crates/hir_def/src/nameres
parentcc6d761a99ab3b7e28ed13ca3839358f3341da4d (diff)
parent39f190b72ccab9a166529f6ae1c8d5d562b15571 (diff)
Merge #9247
9247: internal: refactor unresolved extern crate diagnostic r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir_def/src/nameres')
-rw-r--r--crates/hir_def/src/nameres/tests/diagnostics.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs
index c82deca9c..84d6fdc93 100644
--- a/crates/hir_def/src/nameres/tests/diagnostics.rs
+++ b/crates/hir_def/src/nameres/tests/diagnostics.rs
@@ -26,35 +26,6 @@ fn unresolved_import() {
26} 26}
27 27
28#[test] 28#[test]
29fn unresolved_extern_crate() {
30 check_diagnostics(
31 r"
32 //- /main.rs crate:main deps:core
33 extern crate core;
34 extern crate doesnotexist;
35 //^^^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedExternCrate
36 //- /lib.rs crate:core
37 ",
38 );
39}
40
41#[test]
42fn extern_crate_self_as() {
43 cov_mark::check!(extern_crate_self_as);
44 check_diagnostics(
45 r"
46 //- /lib.rs
47 extern crate doesnotexist;
48 //^^^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedExternCrate
49 // Should not error.
50 extern crate self as foo;
51 struct Foo;
52 use foo::Foo as Bar;
53 ",
54 );
55}
56
57#[test]
58fn dedup_unresolved_import_from_unresolved_crate() { 29fn dedup_unresolved_import_from_unresolved_crate() {
59 check_diagnostics( 30 check_diagnostics(
60 r" 31 r"