From f0b5832cb85de039cbab0312b4f7bf9491a8c359 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 28 Sep 2020 12:45:20 +0200 Subject: Mark unresolved imports diagnostic as experimental --- crates/hir_def/src/diagnostics.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/hir_def/src/diagnostics.rs') diff --git a/crates/hir_def/src/diagnostics.rs b/crates/hir_def/src/diagnostics.rs index 2ec0fd3fb..001b3c5db 100644 --- a/crates/hir_def/src/diagnostics.rs +++ b/crates/hir_def/src/diagnostics.rs @@ -69,4 +69,11 @@ impl Diagnostic for UnresolvedImport { fn as_any(&self) -> &(dyn Any + Send + 'static) { self } + fn is_experimental(&self) -> bool { + // This currently results in false positives in the following cases: + // - `cfg_if!`-generated code in libstd (we don't load the sysroot correctly) + // - `core::arch` (we don't handle `#[path = "../"]` correctly) + // - proc macros and/or proc macro generated code + true + } } -- cgit v1.2.3