Only test if key is local.
This commit is contained in:
parent
fd318a2f9b
commit
8ed82ebb2a
3 changed files with 110 additions and 76 deletions
|
@ -389,8 +389,7 @@ macro_rules! define_queries {
|
|||
fn compute_fn(tcx: QueryCtxt<'tcx>, key: &Self::Key) ->
|
||||
fn(TyCtxt<'tcx>, Self::Key) -> Self::Value
|
||||
{
|
||||
let is_local = key.query_crate() == LOCAL_CRATE;
|
||||
if is_local {
|
||||
if key.query_crate_is_local() {
|
||||
tcx.queries.local_providers.$name
|
||||
} else {
|
||||
tcx.queries.extern_providers.$name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue