diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-05 10:21:38 +0000 |
|---|---|---|
| committer | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-15 16:53:05 +0000 |
| commit | f261a82a8d2321e64b9d418b1f9c8a13b1c8b24c (patch) | |
| tree | 955dbc33f100f2c84847c3b0237a322ecd518e02 | |
| parent | 327cc62b0d46eda2bd55018a7e8edfab8a143d03 (diff) | |
| download | rust-f261a82a8d2321e64b9d418b1f9c8a13b1c8b24c.tar.gz rust-f261a82a8d2321e64b9d418b1f9c8a13b1c8b24c.zip | |
Use tracing instrumentation for better bug diagnosing
| -rw-r--r-- | compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs b/compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs index f7c902355cb..0d1d2551042 100644 --- a/compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs +++ b/compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs @@ -47,6 +47,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { /// Calling `universal_upper_bound` for such a region gives `fr_fn_body`, /// which has no `external_name` in which case we use `'empty` as the /// region to pass to `infer_opaque_definition_from_instantiation`. + #[instrument(skip(self, infcx))] pub(in crate::borrow_check) fn infer_opaque_types( &self, infcx: &InferCtxt<'_, 'tcx>, @@ -56,10 +57,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { opaque_ty_decls .into_iter() .map(|(opaque_def_id, ty::ResolvedOpaqueTy { concrete_type, substs })| { - debug!( - "infer_opaque_types(concrete_type = {:?}, substs = {:?})", - concrete_type, substs - ); + debug!(?concrete_type, ?substs); let mut subst_regions = vec![self.universal_regions.fr_static]; let universal_substs = @@ -110,10 +108,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { } }); - debug!( - "infer_opaque_types(universal_concrete_type = {:?}, universal_substs = {:?})", - universal_concrete_type, universal_substs - ); + debug!(?universal_concrete_type, ?universal_substs); let remapped_type = infcx.infer_opaque_definition_from_instantiation( opaque_def_id, |
