Skip to content

Commit 6146a51

Browse files
Add more context to the forbidden dep-graph read ICE error message.
1 parent c373ec0 commit 6146a51

File tree

1 file changed

+5
-1
lines changed
  • compiler/rustc_query_system/src/dep_graph

1 file changed

+5
-1
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,10 @@ fn panic_on_forbidden_read<D: Deps>(data: &DepGraphData<D>, dep_node_index: DepN
14021402

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

0 commit comments

Comments
 (0)