rustc: Add a span_unimpl() for debugging
This commit is contained in:
parent
949ba9ca46
commit
6f65ce5255
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue