Always emit unresolved import errors and hide unused import lint#64054
Always emit unresolved import errors and hide unused import lint#64054bors merged 1 commit intorust-lang:masterfrom
Conversation
|
@petrochenkov I originally had a similar intuition to what you mentioned, but in practice I found that we only have hard failures on the first time a module is not found. After that we always get |
|
(I need to make some experiments.) |
|
Mostly superseded by #64265. |
|
Is the behavior of "report all the indeterminate imports as unresolved" correct? I can publish a PR after yours gets merged to do so. I think it is useful to have but not critical if it could lead to bad false positives (due to dependencies: |
|
I don't think it's correct as implemented because What I think we should do is something roughly like this: for import in determinate_imports.chain(indeterminate_imports) {
if let Some(err) = finalize_import(import) {
report_error(err)
} else if is_indeterminate(import) {
report_error("cannot determine resolution")
}
} |
AFAIK, this case should be already covered by marking |
|
☔ The latest upstream changes (presumably #64281) made this pull request unmergeable. Please resolve the merge conflicts. |
6fa3696 to
9a56187
Compare
|
Thanks! |
|
📌 Commit 9a56187 has been approved by |
… r=petrochenkov Always emit unresolved import errors and hide unused import lint Fix rust-lang#63724. r? @petrochenkov
Rollup of 5 pull requests Successful merges: - #63806 (Upgrade rand to 0.7) - #64054 (Always emit unresolved import errors and hide unused import lint) - #64279 (Bump RLS and Rustfmt submodules to use rustc-ap-* v583) - #64317 (Update LLVM submodule) - #64320 (Update version of `rustc-std-workspace-*` crates) Failed merges: r? @ghost
Rollup of 5 pull requests Successful merges: - #63806 (Upgrade rand to 0.7) - #64054 (Always emit unresolved import errors and hide unused import lint) - #64279 (Bump RLS and Rustfmt submodules to use rustc-ap-* v583) - #64317 (Update LLVM submodule) - #64320 (Update version of `rustc-std-workspace-*` crates) Failed merges: r? @ghost
Fix #63724.
r? @petrochenkov