about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2020-04-04 21:23:38 +0300
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2020-04-14 20:03:18 +0300
commitad1617bb490a57988a5d8112b698ad3fdb80e42e (patch)
tree9b8054ef91eb61cc26cdc007ed444b6a2e5b5f95
parent5ebd300090429ef8587b3e4026d6c268b2b23c12 (diff)
downloadrust-ad1617bb490a57988a5d8112b698ad3fdb80e42e.tar.gz
rust-ad1617bb490a57988a5d8112b698ad3fdb80e42e.zip
traits/query/normalize: add some `debug!` logging for the result.
-rw-r--r--src/librustc_trait_selection/traits/query/normalize.rs15
1 files 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 28d59b41e56..0da26abc330 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::<T>(),
+            result,
+            normalizer.obligations.len(),
+        );
+        debug!(
+            "normalize::<{}>: obligations={:?}",
+            ::std::any::type_name::<T>(),
+            normalizer.obligations,
+        );
         if normalizer.error {
             Err(NoSolution)
         } else {
-            Ok(Normalized { value: value1, obligations: normalizer.obligations })
+            Ok(Normalized { value: result, obligations: normalizer.obligations })
         }
     }
 }