|
24 | 24 | #include "rust-hir-type-check.h"
|
25 | 25 | #include "rust-hir-type-check-type.h"
|
26 | 26 | #include "rust-casts.h"
|
| 27 | +#include "rust-mapping-common.h" |
27 | 28 | #include "rust-unify.h"
|
28 | 29 | #include "rust-coercion.h"
|
29 | 30 | #include "rust-hir-type-bounds.h"
|
@@ -186,17 +187,28 @@ unify_site_and (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
|
186 | 187 | TyTy::BaseType *expected = lhs.get_ty ();
|
187 | 188 | TyTy::BaseType *expr = rhs.get_ty ();
|
188 | 189 |
|
189 |
| - rust_debug ( |
190 |
| - "unify_site_and commit %s infer %s id={%u} expected={%s} expr={%s}", |
191 |
| - commit_if_ok ? "true" : "false", implicit_infer_vars ? "true" : "false", id, |
192 |
| - expected->debug_str ().c_str (), expr->debug_str ().c_str ()); |
| 190 | + rust_debug_loc ( |
| 191 | + unify_locus, |
| 192 | + "begin unify_site_and commit %s infer %s id={%u} expected={%s} expr={%s}", |
| 193 | + commit_if_ok ? "true" : "false", implicit_infer_vars ? "true" : "false", |
| 194 | + id == UNKNOWN_HIRID ? 0 : id, expected->debug_str ().c_str (), |
| 195 | + expr->debug_str ().c_str ()); |
193 | 196 |
|
194 | 197 | std::vector<UnifyRules::CommitSite> commits;
|
195 | 198 | std::vector<UnifyRules::InferenceSite> infers;
|
196 | 199 | TyTy::BaseType *result
|
197 | 200 | = UnifyRules::Resolve (lhs, rhs, unify_locus, false /*commit inline*/,
|
198 | 201 | emit_errors, implicit_infer_vars, commits, infers);
|
199 | 202 | bool ok = result->get_kind () != TyTy::TypeKind::ERROR;
|
| 203 | + |
| 204 | + rust_debug_loc (unify_locus, |
| 205 | + "unify_site_and done ok=%s commit %s infer %s id={%u} " |
| 206 | + "expected={%s} expr={%s}", |
| 207 | + ok ? "true" : "false", commit_if_ok ? "true" : "false", |
| 208 | + implicit_infer_vars ? "true" : "false", |
| 209 | + id == UNKNOWN_HIRID ? 0 : id, expected->debug_str ().c_str (), |
| 210 | + expr->debug_str ().c_str ()); |
| 211 | + |
200 | 212 | if (ok && commit_if_ok)
|
201 | 213 | {
|
202 | 214 | for (auto &c : commits)
|
|
0 commit comments