Skip to content

Commit 3b10afa

Browse files
committed
Use a global_tcx
1 parent 529a1a6 commit 3b10afa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc/ty/query/plumbing.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ pub(super) enum TryGetJob<'a, 'tcx: 'a, D: QueryDescription<'tcx> + 'a> {
246246
JobCompleted(Result<(D::Value, DepNodeIndex), Box<CycleError<'tcx>>>),
247247
}
248248

249-
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
249+
impl<'a, 'gcx> TyCtxt<'a, 'gcx, 'gcx> {
250250
#[inline(never)]
251251
#[cold]
252252
pub(super) fn report_cycle(
@@ -337,7 +337,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
337337
if !self.dep_graph.is_fully_enabled() {
338338
return None;
339339
}
340-
match self.dep_graph.try_mark_green(self.global_tcx(), &dep_node) {
340+
match self.dep_graph.try_mark_green(self, &dep_node) {
341341
Some(dep_node_index) => {
342342
debug_assert!(self.dep_graph.is_green(&dep_node));
343343
self.dep_graph.read_index(dep_node_index);
@@ -909,7 +909,7 @@ macro_rules! define_queries_inner {
909909
$($(#[$attr])*
910910
#[inline(always)]
911911
pub fn $name(self, key: $K) -> $V {
912-
self.tcx.get_query::<queries::$name<'_>>(self.span, key)
912+
self.tcx.global_tcx().get_query::<queries::$name<'_>>(self.span, key)
913913
})*
914914
}
915915

0 commit comments

Comments
 (0)