Skip to content

Commit f261a82

Browse files
committed
Use tracing instrumentation for better bug diagnosing
1 parent 327cc62 commit f261a82

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
4747
/// Calling `universal_upper_bound` for such a region gives `fr_fn_body`,
4848
/// which has no `external_name` in which case we use `'empty` as the
4949
/// region to pass to `infer_opaque_definition_from_instantiation`.
50+
#[instrument(skip(self, infcx))]
5051
pub(in crate::borrow_check) fn infer_opaque_types(
5152
&self,
5253
infcx: &InferCtxt<'_, 'tcx>,
@@ -56,10 +57,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
5657
opaque_ty_decls
5758
.into_iter()
5859
.map(|(opaque_def_id, ty::ResolvedOpaqueTy { concrete_type, substs })| {
59-
debug!(
60-
"infer_opaque_types(concrete_type = {:?}, substs = {:?})",
61-
concrete_type, substs
62-
);
60+
debug!(?concrete_type, ?substs);
6361

6462
let mut subst_regions = vec![self.universal_regions.fr_static];
6563
let universal_substs =
@@ -110,10 +108,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
110108
}
111109
});
112110

113-
debug!(
114-
"infer_opaque_types(universal_concrete_type = {:?}, universal_substs = {:?})",
115-
universal_concrete_type, universal_substs
116-
);
111+
debug!(?universal_concrete_type, ?universal_substs);
117112

118113
let remapped_type = infcx.infer_opaque_definition_from_instantiation(
119114
opaque_def_id,

0 commit comments

Comments
 (0)