Use tracing instrumentation for better bug diagnosing
This commit is contained in:
parent
327cc62b0d
commit
f261a82a8d
1 changed files with 3 additions and 8 deletions
|
@ -47,6 +47,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||||
/// Calling `universal_upper_bound` for such a region gives `fr_fn_body`,
|
/// 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
|
/// which has no `external_name` in which case we use `'empty` as the
|
||||||
/// region to pass to `infer_opaque_definition_from_instantiation`.
|
/// region to pass to `infer_opaque_definition_from_instantiation`.
|
||||||
|
#[instrument(skip(self, infcx))]
|
||||||
pub(in crate::borrow_check) fn infer_opaque_types(
|
pub(in crate::borrow_check) fn infer_opaque_types(
|
||||||
&self,
|
&self,
|
||||||
infcx: &InferCtxt<'_, 'tcx>,
|
infcx: &InferCtxt<'_, 'tcx>,
|
||||||
|
@ -56,10 +57,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||||
opaque_ty_decls
|
opaque_ty_decls
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(opaque_def_id, ty::ResolvedOpaqueTy { concrete_type, substs })| {
|
.map(|(opaque_def_id, ty::ResolvedOpaqueTy { concrete_type, substs })| {
|
||||||
debug!(
|
debug!(?concrete_type, ?substs);
|
||||||
"infer_opaque_types(concrete_type = {:?}, substs = {:?})",
|
|
||||||
concrete_type, substs
|
|
||||||
);
|
|
||||||
|
|
||||||
let mut subst_regions = vec![self.universal_regions.fr_static];
|
let mut subst_regions = vec![self.universal_regions.fr_static];
|
||||||
let universal_substs =
|
let universal_substs =
|
||||||
|
@ -110,10 +108,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
debug!(
|
debug!(?universal_concrete_type, ?universal_substs);
|
||||||
"infer_opaque_types(universal_concrete_type = {:?}, universal_substs = {:?})",
|
|
||||||
universal_concrete_type, universal_substs
|
|
||||||
);
|
|
||||||
|
|
||||||
let remapped_type = infcx.infer_opaque_definition_from_instantiation(
|
let remapped_type = infcx.infer_opaque_definition_from_instantiation(
|
||||||
opaque_def_id,
|
opaque_def_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue