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') 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 From fa9ed4e0ce633e51d1411951bf044719e6837457 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 13 Jun 2021 17:06:36 +0300 Subject: internal: refactor unresolved macro call diagnostic --- crates/hir_def/src/nameres/tests/diagnostics.rs | 31 ------------------------- 1 file changed, 31 deletions(-) (limited to 'crates/hir_def/src') diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs index 7b0f42004..5a088b6e5 100644 --- a/crates/hir_def/src/nameres/tests/diagnostics.rs +++ b/crates/hir_def/src/nameres/tests/diagnostics.rs @@ -54,37 +54,6 @@ fn inactive_via_cfg_attr() { ); } -#[test] -fn unresolved_legacy_scope_macro() { - check_diagnostics( - r#" - //- /lib.rs - macro_rules! m { () => {} } - - m!(); - m2!(); - //^^^^^^ UnresolvedMacroCall - "#, - ); -} - -#[test] -fn unresolved_module_scope_macro() { - check_diagnostics( - r#" - //- /lib.rs - mod mac { - #[macro_export] - macro_rules! m { () => {} } - } - - self::m!(); - self::m2!(); - //^^^^^^^^^^^^ UnresolvedMacroCall - "#, - ); -} - #[test] fn builtin_macro_fails_expansion() { check_diagnostics( -- cgit v1.2.3