From ad1617bb490a57988a5d8112b698ad3fdb80e42e Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Sat, 4 Apr 2020 21:23:38 +0300 Subject: [PATCH] traits/query/normalize: add some `debug!` logging for the result. --- .../traits/query/normalize.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/librustc_trait_selection/traits/query/normalize.rs b/src/librustc_trait_selection/traits/query/normalize.rs index 28d59b41e564..0da26abc330a 100644 --- a/src/librustc_trait_selection/traits/query/normalize.rs +++ b/src/librustc_trait_selection/traits/query/normalize.rs @@ -59,11 +59,22 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> { anon_depth: 0, }; - let value1 = value.fold_with(&mut normalizer); + let result = value.fold_with(&mut normalizer); + debug!( + "normalize::<{}>: result={:?} with {} obligations", + ::std::any::type_name::(), + result, + normalizer.obligations.len(), + ); + debug!( + "normalize::<{}>: obligations={:?}", + ::std::any::type_name::(), + normalizer.obligations, + ); if normalizer.error { Err(NoSolution) } else { - Ok(Normalized { value: value1, obligations: normalizer.obligations }) + Ok(Normalized { value: result, obligations: normalizer.obligations }) } } }