Skip to content

Commit 0fae332

Browse files
committed
add some debug! to coercion
1 parent 59babd8 commit 0fae332

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_typeck/check/coercion.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,10 @@ impl<'f, 'gcx, 'tcx> Coerce<'f, 'gcx, 'tcx> {
195195
// Consider coercing the subtype to a DST
196196
let unsize = self.coerce_unsized(a, b);
197197
if unsize.is_ok() {
198+
debug!("coerce: unsize successful");
198199
return unsize;
199200
}
201+
debug!("coerce: unsize failed");
200202

201203
// Examine the supertype and consider auto-borrowing.
202204
//
@@ -745,7 +747,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
745747
{
746748
let prev_ty = self.resolve_type_vars_with_obligations(prev_ty);
747749
let new_ty = self.resolve_type_vars_with_obligations(new_ty);
748-
debug!("coercion::try_find_lub({:?}, {:?})", prev_ty, new_ty);
750+
debug!("coercion::try_find_coercion_lub({:?}, {:?})", prev_ty, new_ty);
749751

750752
// Special-ish case: we can coerce any type `T` into the `!`
751753
// type, but only if the source expression diverges.

0 commit comments

Comments
 (0)