diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-03-22 15:21:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 15:21:30 +0100 |
| commit | 014a4ee9f5ea67798bbc7a2e815d4acc986967ce (patch) | |
| tree | 5e572f65a0e72cf2fe68a018acb3c3b3610494eb | |
| parent | 1fdf7d18ad2f74ecb3e4a113ae3251bef4521e2c (diff) | |
| parent | 688c857c560e60a98576afa52f0829d54164e180 (diff) | |
| download | rust-014a4ee9f5ea67798bbc7a2e815d4acc986967ce.tar.gz rust-014a4ee9f5ea67798bbc7a2e815d4acc986967ce.zip | |
Rollup merge of #83367 - richkadel:query-err-msg, r=jyn514
Improve error message for unassigned query provider Fixes: #83122 r? `@jyn514` This implements the change we agreed on. Thanks!
| -rw-r--r-- | compiler/rustc_middle/src/ty/query/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/query/mod.rs b/compiler/rustc_middle/src/ty/query/mod.rs index 48e777f7158..c170858ba85 100644 --- a/compiler/rustc_middle/src/ty/query/mod.rs +++ b/compiler/rustc_middle/src/ty/query/mod.rs @@ -217,8 +217,11 @@ macro_rules! define_callbacks { fn default() -> Self { Providers { $($name: |_, key| bug!( - "`tcx.{}({:?})` unsupported by its crate", - stringify!($name), key + "`tcx.{}({:?})` unsupported by its crate; \ + perhaps the `{}` query was never assigned a provider function", + stringify!($name), + key, + stringify!($name), ),)* } } |
