diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-01-15 21:51:52 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-15 21:51:52 +0900 |
| commit | 38ca7b707e584fb5f1b89b25ce3c2fbd6ba7d492 (patch) | |
| tree | 39d93c48966ad8b37fd7e5cd06be4ed0a5ac2470 | |
| parent | eed625671a31f9474e0b33cf98b0be25ca633d75 (diff) | |
| parent | 01dc44bfe00e374cf769cee5757d0ac97faa15a2 (diff) | |
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
| -rw-r--r-- | src/librustc/infer/opaque_types/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/infer/opaque_types/mod.rs b/src/librustc/infer/opaque_types/mod.rs index a1afb1a86be..ee214bea7b8 100644 --- a/src/librustc/infer/opaque_types/mod.rs +++ b/src/librustc/infer/opaque_types/mod.rs @@ -1219,7 +1219,7 @@ pub fn may_define_opaque_type(tcx: TyCtxt<'_>, def_id: DefId, opaque_hir_id: hir let res = hir_id == scope; trace!( "may_define_opaque_type(def={:?}, opaque_node={:?}) = {}", - tcx.hir().get(hir_id), + tcx.hir().find(hir_id), tcx.hir().get(opaque_hir_id), res ); |
