Skip to content

Fix ICE when compiling nightly std/rustc on beta compiler #89785

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

nbdd0121
Copy link
Contributor

Fix #89775

#89479 renames a lot of diagnostic items, but it happens that the beta compiler assumes that there must be DefId with rustc_diagnostic_item = "send_trait", causing an ICE when compiling stage 0 std or stage 1 compiler. So gate it with cfg(bootstrap).

The unwrap is also removed, so that existence of the diagnostic item is not required. I ripgreped the code base and this seems the only place where unwrap is called on the return value of get_diagnostic_item.

@rust-highfive
Copy link
Contributor

r? @wesleywiser

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 11, 2021
@Mark-Simulacrum
Copy link
Member

Does this fix just that particular bug? I'd expect all the other diagnostic items to cause similar issues, though I guess only if particular codepaths execute...

@nbdd0121
Copy link
Contributor Author

For other diagnostic items, worse diagnostics may be produced when bootstrapping, but this one causes ICE.

Given that we are close to the next release I think we can wait for other diagnostic items...

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 11, 2021

📌 Commit 148f456 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 12, 2021
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#89471 (Use Ancestory to check default fn in const impl instead of comparing idents)
 - rust-lang#89643 (Fix inherent impl overlap check.)
 - rust-lang#89651 (Add `Poll::ready` and revert stabilization of `task::ready!`)
 - rust-lang#89675 (Re-use TypeChecker instead of passing around some of its fields )
 - rust-lang#89710 (Add long explanation for error E0482)
 - rust-lang#89756 (Greatly reduce amount of debuginfo compiled for bootstrap itself)
 - rust-lang#89760 (Remove hack ignoring unused attributes for stage 0 std)
 - rust-lang#89772 (Fix function-names test for GDB 10.1)
 - rust-lang#89785 (Fix ICE when compiling nightly std/rustc on beta compiler)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f94a325 into rust-lang:master Oct 12, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 12, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: internal compiler error: trimmed_def_paths constructed
6 participants