Skip to content

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

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Delta17920:fix-query-dep-graph
Mar 1, 2026
Merged

Fix ICE on empty file with -Zquery-dep-graph#153210
rust-bors[bot] merged 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
@Delta17920 Delta17920 requested a review from lqd February 28, 2026 11:31
@rust-bors rust-bors bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 28, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 28, 2026

⚠️ A new commit 038b718390d1076c201eaa6c72bb2a2aff9633f5 was pushed to the branch, the PR will need to be re-approved.

@JonathanBrouwer
Copy link
Contributor

@bors r=jdonszelmann,JonathanBrouwer rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 28, 2026

📌 Commit 038b718 has been approved by jdonszelmann,JonathanBrouwer

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 28, 2026
…jdonszelmann,JonathanBrouwer

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
rust-bors bot pushed a commit that referenced this pull request Feb 28, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #146989 (Inhibit all-absent-variant optimization for all enum reprs that inhibit layout optimization, not just repr(C).)
 - #151991 (std: sys: pal: uefi: os: Implement split_paths)
 - #152794 (Fix ICE in `try_to_raw_bytes` when array elements have mismatched)
 - #153052 (std random.rs: update link to RTEMS docs)
 - #153054 (docs: note env var influence on `temp_dir` and `env_clear` on Windows)
 - #153061 (cleanup `tests/ui/box`, part 2)
 - #153197 (style: Update doctests for `TryFrom<integer> for bool` and `From<bool> for float`)
 - #153210 (Fix ICE on empty file with -Zquery-dep-graph)
 - #153228 (Remove `TranslationError`)
@rust-bors rust-bors bot merged commit f462a5b into rust-lang:main Mar 1, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 1, 2026
rust-timer added a commit that referenced this pull request Mar 1, 2026
Rollup merge of #153210 - Delta17920:fix-query-dep-graph, r=jdonszelmann,JonathanBrouwer

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 #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

5 participants