Skip to content

Commit

Permalink
Add more context to the forbidden dep-graph read ICE error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Apr 22, 2024
1 parent c373ec0 commit 6146a51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/rustc_query_system/src/dep_graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,10 @@ fn panic_on_forbidden_read<D: Deps>(data: &DepGraphData<D>, dep_node_index: DepN

panic!(
"Error: trying to record dependency on DepNode {dep_node} in a \
context that does not allow it (e.g. during query deserialization)."
context that does not allow it (e.g. during query deserialization). \
The most common case of recording a dependency on a DepNode `foo` is \
when the correspondng query `foo` is invoked. Invoking queries is not \
allowed as part of loading something from the incremental on-disk cache. \
See <https://github.com/rust-lang/rust/pull/91919>."
)
}

0 comments on commit 6146a51

Please sign in to comment.