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

Do not ICE when failing to resolve for rustdoc. #109345

Closed
wants to merge 1 commit into from

Conversation

cjgillot
Copy link
Contributor

Path resolution may fail and return Indeterminate if there are already errors that obscure the name space.
In that case, we shouldn't ICE, and report that resolution failed to rustdoc.

Fixes #109343
r? @petrochenkov

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 19, 2023
@petrochenkov
Copy link
Contributor

Indeterminate should never be produced during late resolution, when expansion is finished and all the crate structures are built (those crate structures include Res::Err stubs for bad imports).

If Indeterminate is produced here, then something wrong is going either with the resolution determinacy logic, or maybe with Res::Err stub insertion logic, and this PR hides the root issue.

@petrochenkov
Copy link
Contributor

@bvanjoi
If you want a next task you could try debugging this, the investigation should be pretty similar to #108729.

@petrochenkov
Copy link
Contributor

Possible duplicates - #96012, #108762.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2023
@cjgillot cjgillot closed this Mar 25, 2023
@cjgillot cjgillot deleted the issue-109343 branch March 25, 2023 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: unreachable compiler/rustc_resolve/src/lib.rs
3 participants