Wrap TyCtxt inside a QueryCtxt for queries.
This commit is contained in:
parent
dab9b89221
commit
2db2776589
9 changed files with 82 additions and 49 deletions
|
@ -55,6 +55,7 @@
|
|||
//!
|
||||
//! [dependency graph]: https://rustc-dev-guide.rust-lang.org/query.html
|
||||
|
||||
use crate::ty::query::QueryCtxt;
|
||||
use crate::ty::TyCtxt;
|
||||
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
|
@ -261,7 +262,7 @@ pub mod dep_kind {
|
|||
|
||||
if let Some(key) = recover(tcx, dep_node) {
|
||||
force_query::<queries::$variant<'_>, _>(
|
||||
tcx,
|
||||
QueryCtxt(tcx),
|
||||
key,
|
||||
DUMMY_SP,
|
||||
*dep_node
|
||||
|
@ -287,7 +288,7 @@ pub mod dep_kind {
|
|||
.unwrap_or(false));
|
||||
|
||||
let key = recover(tcx, dep_node).unwrap_or_else(|| panic!("Failed to recover key for {:?} with hash {}", dep_node, dep_node.hash));
|
||||
if queries::$variant::cache_on_disk(tcx, &key, None) {
|
||||
if queries::$variant::cache_on_disk(QueryCtxt(tcx), &key, None) {
|
||||
let _ = tcx.$variant(key);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue