Skip to content

Commit 000046c

Browse files
bors[bot]Jonas Schievink
and
Jonas Schievink
authored
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]>
2 parents 2edf15a + f0b5832 commit 000046c

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)