aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-09-28 11:45:20 +0100
committerJonas Schievink <[email protected]>2020-09-28 11:45:20 +0100
commitf0b5832cb85de039cbab0312b4f7bf9491a8c359 (patch)
tree81380bb8550a7af1d93d26b86e44849381eee35e /crates/hir_def/src
parent3b52d3181a44a0ccedd30c52e70ce84231918e72 (diff)
Mark unresolved imports diagnostic as experimental
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r--crates/hir_def/src/diagnostics.rs7
1 files changed, 7 insertions, 0 deletions
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 {
69 fn as_any(&self) -> &(dyn Any + Send + 'static) { 69 fn as_any(&self) -> &(dyn Any + Send + 'static) {
70 self 70 self
71 } 71 }
72 fn is_experimental(&self) -> bool {
73 // This currently results in false positives in the following cases:
74 // - `cfg_if!`-generated code in libstd (we don't load the sysroot correctly)
75 // - `core::arch` (we don't handle `#[path = "../<path>"]` correctly)
76 // - proc macros and/or proc macro generated code
77 true
78 }
72} 79}