Skip to content

Commit 014a4ee

Browse files
authored
Rollup merge of rust-lang#83367 - richkadel:query-err-msg, r=jyn514
Improve error message for unassigned query provider Fixes: rust-lang#83122 r? `@jyn514` This implements the change we agreed on. Thanks!
2 parents 1fdf7d1 + 688c857 commit 014a4ee

File tree

1 file changed

+5
-2
lines changed
  • compiler/rustc_middle/src/ty/query

1 file changed

+5
-2
lines changed

compiler/rustc_middle/src/ty/query/mod.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,11 @@ macro_rules! define_callbacks {
217217
fn default() -> Self {
218218
Providers {
219219
$($name: |_, key| bug!(
220-
"`tcx.{}({:?})` unsupported by its crate",
221-
stringify!($name), key
220+
"`tcx.{}({:?})` unsupported by its crate; \
221+
perhaps the `{}` query was never assigned a provider function",
222+
stringify!($name),
223+
key,
224+
stringify!($name),
222225
),)*
223226
}
224227
}

0 commit comments

Comments
 (0)