Skip to content

Commit 38ca7b7

Browse files
authored
Rollup merge of #68226 - Aaron1011:fix/opaque-trace, r=matthewjasper
Avoid calling tcx.hir().get() on CRATE_HIR_ID This was causing an ICE when enabling trace logging for an unrelated module, since the arguments to `trace!` ended up getting evaluated
2 parents eed6256 + 01dc44b commit 38ca7b7

File tree

1 file changed

+1
-1
lines changed
  • src/librustc/infer/opaque_types

1 file changed

+1
-1
lines changed

src/librustc/infer/opaque_types/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ pub fn may_define_opaque_type(tcx: TyCtxt<'_>, def_id: DefId, opaque_hir_id: hir
12191219
let res = hir_id == scope;
12201220
trace!(
12211221
"may_define_opaque_type(def={:?}, opaque_node={:?}) = {}",
1222-
tcx.hir().get(hir_id),
1222+
tcx.hir().find(hir_id),
12231223
tcx.hir().get(opaque_hir_id),
12241224
res
12251225
);

0 commit comments

Comments
 (0)