aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-09-28 11:47:33 +0100
committerGitHub <[email protected]>2020-09-28 11:47:33 +0100
commit000046cfa08948803607538e27808b6bf9dc7afb (patch)
treec798557b5445c31891a9d53d6fd00b8eabe1c6f1 /crates/hir_def/src
parent2edf15aede0a9663e6fc512d2e0bf3e8df3fb3c0 (diff)
parentf0b5832cb85de039cbab0312b4f7bf9491a8c359 (diff)
Merge #6085
6085: Mark unresolved imports diagnostic as experimental r=jonas-schievink a=jonas-schievink It causes a lot of false positives for people. We collected all of the known ones during the last week. Co-authored-by: Jonas Schievink <[email protected]>
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}