rustc: Add a span_unimpl() for debugging

This commit is contained in:
Patrick Walton 2011-03-18 12:30:44 -07:00
parent 949ba9ca46
commit 6f65ce5255
2 changed files with 11 additions and 1 deletions

View File

@ -45,6 +45,15 @@ obj session(cfg targ) {
fail;
}
fn span_unimpl(span sp, str msg) {
log #fmt("%s:%u:%u:%u:%u: error: unimplemented %s",
sp.filename,
sp.lo.line, sp.lo.col,
sp.hi.line, sp.hi.col,
msg);
fail;
}
fn unimpl(str msg) {
log #fmt("error: unimplemented %s", msg);
fail;

View File

@ -1402,7 +1402,8 @@ fn demand_expr_full(&@fn_ctxt fcx, @ty.t expected, @ast.expr e,
}
case (_) {
fcx.ccx.sess.unimpl("type unification for expression variant");
fcx.ccx.sess.span_unimpl(e.span,
"type unification for expression variant");
fail;
}
}