Skip to content

Avoid a branch on key being local for queries that use the same local and extern providers #85830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 26, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix test
  • Loading branch information
bjorn3 committed Oct 25, 2021
commit 13abc1ae30e406d8f9f7419f751ef128c59e2b00
5 changes: 2 additions & 3 deletions src/test/run-make-fulldeps/obtain-borrowck/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use rustc_hir::itemlikevisit::ItemLikeVisitor;
use rustc_interface::interface::Compiler;
use rustc_interface::{Config, Queries};
use rustc_middle::ty::query::query_values::mir_borrowck;
use rustc_middle::ty::query::Providers;
use rustc_middle::ty::query::{ExternProviders, Providers};
use rustc_middle::ty::{self, TyCtxt};
use rustc_session::Session;
use std::cell::RefCell;
Expand Down Expand Up @@ -87,9 +87,8 @@ impl rustc_driver::Callbacks for CompilerCalls {
}
}

fn override_queries(_session: &Session, local: &mut Providers, external: &mut Providers) {
fn override_queries(_session: &Session, local: &mut Providers, _external: &mut ExternProviders) {
local.mir_borrowck = mir_borrowck;
external.mir_borrowck = mir_borrowck;
}

// Since mir_borrowck does not have access to any other state, we need to use a
Expand Down