Improve error message for unsupported crate
This commit is contained in:
parent
1463688700
commit
dddfb7db24
1 changed files with 3 additions and 2 deletions
|
@ -275,10 +275,11 @@ macro_rules! define_callbacks {
|
|||
fn default() -> Self {
|
||||
Providers {
|
||||
$($name: |_, key| bug!(
|
||||
"`tcx.{}({:?})` unsupported by its crate; \
|
||||
perhaps the `{}` query was never assigned a provider function",
|
||||
"`tcx.{}({:?})` unsupported for {} crate; \
|
||||
perhaps the `{}` query was never assigned a provider function. Queries can be either made to the local crate, or the external crate. This error means you tried to use it for one that's not supported.",
|
||||
stringify!($name),
|
||||
key,
|
||||
if key.query_crate_is_local() { "local" } : { "external" } ,
|
||||
stringify!($name),
|
||||
),)*
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue