1
Fork 0

traits/query/normalize: add some debug! logging for the result.

This commit is contained in:
Eduard-Mihai Burtescu 2020-04-04 21:23:38 +03:00
parent 5ebd300090
commit ad1617bb49

View file

@ -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 })
}
}
}