From 6d104de15aee6a24a442871c59528c39d410c161 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 13 Jun 2021 16:42:34 +0300 Subject: internal: refactor unresolved import diagnostic --- crates/hir_def/src/nameres/tests/diagnostics.rs | 37 ------------------------- 1 file changed, 37 deletions(-) (limited to 'crates/hir_def/src/nameres/tests') 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 @@ -12,43 +12,6 @@ fn check_no_diagnostics(ra_fixture: &str) { db.check_no_diagnostics(); } -#[test] -fn unresolved_import() { - check_diagnostics( - r" - use does_exist; - use does_not_exist; - //^^^^^^^^^^^^^^^^^^^ UnresolvedImport - - mod does_exist {} - ", - ); -} - -#[test] -fn dedup_unresolved_import_from_unresolved_crate() { - check_diagnostics( - r" - //- /main.rs crate:main - mod a { - extern crate doesnotexist; - //^^^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedExternCrate - - // Should not error, since we already errored for the missing crate. - use doesnotexist::{self, bla, *}; - - use crate::doesnotexist; - //^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedImport - } - - mod m { - use super::doesnotexist; - //^^^^^^^^^^^^^^^^^^^^^^^^ UnresolvedImport - } - ", - ); -} - #[test] fn inactive_item() { // Additional tests in `cfg` crate. This only tests disabled cfgs. -- cgit v1.2.3