From 39f190b72ccab9a166529f6ae1c8d5d562b15571 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 13 Jun 2021 16:05:43 +0300 Subject: internal: refactor unresolved extern crate diagnostic --- crates/hir_def/src/nameres/tests/diagnostics.rs | 29 ------------------------- 1 file changed, 29 deletions(-) (limited to 'crates/hir_def') 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 @@ -25,35 +25,6 @@ fn unresolved_import() { ); } -#[test] -fn unresolved_extern_crate() { - check_diagnostics( - r" - //- /main.rs crate:main deps:core - extern crate core; - extern crate doesnotexist; - //^^^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedExternCrate - //- /lib.rs crate:core - ", - ); -} - -#[test] -fn extern_crate_self_as() { - cov_mark::check!(extern_crate_self_as); - check_diagnostics( - r" - //- /lib.rs - extern crate doesnotexist; - //^^^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedExternCrate - // Should not error. - extern crate self as foo; - struct Foo; - use foo::Foo as Bar; - ", - ); -} - #[test] fn dedup_unresolved_import_from_unresolved_crate() { check_diagnostics( -- cgit v1.2.3