From: Niko Matsakis Date: Tue, 11 Apr 2017 21:11:41 +0000 (-0400) Subject: add some debug! to coercion X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=0fae3324a2f58e921e2094a6971962c0b09c04ee;p=rust.git add some debug! to coercion --- diff --git a/src/librustc_typeck/check/coercion.rs b/src/librustc_typeck/check/coercion.rs index a5acd0c7e53..2033eaf8861 100644 --- a/src/librustc_typeck/check/coercion.rs +++ b/src/librustc_typeck/check/coercion.rs @@ -195,8 +195,10 @@ fn coerce(&self, // Consider coercing the subtype to a DST let unsize = self.coerce_unsized(a, b); if unsize.is_ok() { + debug!("coerce: unsize successful"); return unsize; } + debug!("coerce: unsize failed"); // Examine the supertype and consider auto-borrowing. // @@ -745,7 +747,7 @@ fn try_find_coercion_lub(&self, { let prev_ty = self.resolve_type_vars_with_obligations(prev_ty); let new_ty = self.resolve_type_vars_with_obligations(new_ty); - debug!("coercion::try_find_lub({:?}, {:?})", prev_ty, new_ty); + debug!("coercion::try_find_coercion_lub({:?}, {:?})", prev_ty, new_ty); // Special-ish case: we can coerce any type `T` into the `!` // type, but only if the source expression diverges.