Skip to content

Fix ICE on empty file with -Zquery-dep-graph#153210

Open
Delta17920 wants to merge 1 commit intorust-lang:mainfrom
Delta17920:fix-query-dep-graph
Open

Fix ICE on empty file with -Zquery-dep-graph#153210
Delta17920 wants to merge 1 commit intorust-lang:mainfrom
Delta17920:fix-query-dep-graph

Conversation

@Delta17920
Copy link
Contributor

@Delta17920 Delta17920 commented Feb 28, 2026

added a guard in DepGraph::register_dep_node_debug_str so it early-returns
when self.data is still None. this happens for the first few dep-nodes
in an empty crate with -Z query-dep-graph, which caused the previous
unwrap() panic.

fixes #153199

@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 Feb 28, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 28, 2026

r? @jdonszelmann

rustbot has assigned @jdonszelmann.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, incremental, query-system
  • compiler, incremental, query-system expanded to 69 candidates
  • Random selection from 16 candidates

@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 28, 2026

📌 Commit f600795 has been approved by jdonszelmann

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Feb 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 28, 2026
…jdonszelmann

Fix ICE on empty file with -Zquery-dep-graph

added a guard in `DepGraph::register_dep_node_debug_str` so it early-returns
when `self.data` is still `None`. this happens for the first few dep-nodes
in an empty crate with `-Z query-dep-graph`, which caused the previous
`unwrap()` panic.

fixes rust-lang#153199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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]: -Zquery-dep-graph on empty file

3 participants