From ab80162e3ffe52ded81917b8f0c032c9bc9d3c58 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 25 Jan 2019 14:54:42 -0500 Subject: [PATCH] add a lot more `debug!` to `try_report_placeholders_trait` --- .../nice_region_error/placeholder_error.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs b/src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs index b5187d2dbb6..94e20731bfe 100644 --- a/src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs +++ b/src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs @@ -206,6 +206,15 @@ impl NiceRegionError<'me, 'gcx, 'tcx> { expected_substs: &'tcx Substs<'tcx>, actual_substs: &'tcx Substs<'tcx>, ) -> ErrorReported { + debug!("try_report_placeholders_trait(\ + vid={:?}, \ + sub_placeholder={:?}, \ + sup_placeholder={:?}, \ + trait_def_id={:?}, \ + expected_substs={:?}, \ + actual_substs={:?})", + vid, sub_placeholder, sup_placeholder, trait_def_id, expected_substs, actual_substs); + let mut err = self.tcx().sess.struct_span_err( cause.span(&self.tcx()), &format!( @@ -276,6 +285,12 @@ impl NiceRegionError<'me, 'gcx, 'tcx> { .tcx() .any_free_region_meets(&actual_trait_ref.self_ty(), |r| Some(r) == vid); + debug!("try_report_placeholders_trait: actual_has_vid={:?}", actual_has_vid); + debug!("try_report_placeholders_trait: expected_has_vid={:?}", expected_has_vid); + debug!("try_report_placeholders_trait: has_sub={:?}", has_sub); + debug!("try_report_placeholders_trait: has_sup={:?}", has_sup); + debug!("try_report_placeholders_trait: self_ty_has_vid={:?}", self_ty_has_vid); + RegionHighlightMode::maybe_highlighting_region(sub_placeholder, has_sub, || { RegionHighlightMode::maybe_highlighting_region(sup_placeholder, has_sup, || { match (has_sub, has_sup) {