Skip to content

Commit f0b5832

Browse files
author
Jonas Schievink
committed
Mark unresolved imports diagnostic as experimental
1 parent 3b52d31 commit f0b5832

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/hir_def/src/diagnostics.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ impl Diagnostic for UnresolvedImport {
6969
fn as_any(&self) -> &(dyn Any + Send + 'static) {
7070
self
7171
}
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+
}
7279
}

0 commit comments

Comments
 (0)