Skip to content

Commit 688c857

Browse files
committed
Improve error message for unassigned query provider
Fixes: 83122
1 parent cebc8fe commit 688c857

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)