Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc should not try to analyze the crate after "multiple candidates" messages #118130

Open
RalfJung opened this issue Nov 21, 2023 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

RalfJung commented Nov 21, 2023

#118129 is an example of an issue that somehow leads to "multiple candidates" errors for each rustc crate. However, it took hours to get to that conclusion, because rustc shows >1800 errors saying all sorts of things could not be found. The actual signal is drowning in that noise. This is also fairly common when something goes wrong with the sysroot and it has multiple core/std candidates and imports none of them: all one can see are hundreds of errors saying that some lang item is missing.

It would be better if rustc stopped after crate loading when there was such a "multiple candidates" error, or at least didn't show all the follow-up messages.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 21, 2023
@bjorn3
Copy link
Member

bjorn3 commented Nov 21, 2023

I think we should abort after failing to load libcore or libstd in general independent of whatever error caused it.

@Noratrieb Noratrieb added D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. D-verbose Diagnostics: Too much output caused by a single piece of incorrect code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants