Skip to content

Commit ad1617b

Browse files
committed
traits/query/normalize: add some debug! logging for the result.
1 parent 5ebd300 commit ad1617b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/librustc_trait_selection/traits/query/normalize.rs

+13-2
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,22 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> {
5959
anon_depth: 0,
6060
};
6161

62-
let value1 = value.fold_with(&mut normalizer);
62+
let result = value.fold_with(&mut normalizer);
63+
debug!(
64+
"normalize::<{}>: result={:?} with {} obligations",
65+
::std::any::type_name::<T>(),
66+
result,
67+
normalizer.obligations.len(),
68+
);
69+
debug!(
70+
"normalize::<{}>: obligations={:?}",
71+
::std::any::type_name::<T>(),
72+
normalizer.obligations,
73+
);
6374
if normalizer.error {
6475
Err(NoSolution)
6576
} else {
66-
Ok(Normalized { value: value1, obligations: normalizer.obligations })
77+
Ok(Normalized { value: result, obligations: normalizer.obligations })
6778
}
6879
}
6980
}

0 commit comments

Comments
 (0)