1
Fork 0

Change a few span_fatals to span_err

This commit is contained in:
Tim Chevalier 2011-09-15 15:24:42 -07:00
parent 994beca00d
commit 059952da5b

View file

@ -2494,7 +2494,7 @@ fn check_pred_expr(fcx: @fn_ctxt, e: @ast::expr) -> bool {
alt e.node { alt e.node {
ast::expr_call(operator, operands) { ast::expr_call(operator, operands) {
if !ty::is_pred_ty(fcx.ccx.tcx, expr_ty(fcx.ccx.tcx, operator)) { if !ty::is_pred_ty(fcx.ccx.tcx, expr_ty(fcx.ccx.tcx, operator)) {
fcx.ccx.tcx.sess.span_fatal fcx.ccx.tcx.sess.span_err
(operator.span, (operator.span,
"operator in constraint has non-boolean return type"); "operator in constraint has non-boolean return type");
} }
@ -2506,7 +2506,7 @@ fn check_pred_expr(fcx: @fn_ctxt, e: @ast::expr) -> bool {
// do nothing // do nothing
} }
_ { _ {
fcx.ccx.tcx.sess.span_fatal(operator.span, fcx.ccx.tcx.sess.span_err(operator.span,
"Impure function as operator \ "Impure function as operator \
in constraint"); in constraint");
} }
@ -2516,7 +2516,7 @@ in constraint");
let s = let s =
"Constraint args must be \ "Constraint args must be \
slot variables or literals"; slot variables or literals";
fcx.ccx.tcx.sess.span_fatal(e.span, s); fcx.ccx.tcx.sess.span_err(e.span, s);
} }
} }
} }
@ -2524,11 +2524,11 @@ slot variables or literals";
let s = let s =
"In a constraint, expected the \ "In a constraint, expected the \
constraint name to be an explicit name"; constraint name to be an explicit name";
fcx.ccx.tcx.sess.span_fatal(e.span, s); fcx.ccx.tcx.sess.span_err(e.span, s);
} }
} }
} }
_ { fcx.ccx.tcx.sess.span_fatal(e.span, "check on non-predicate"); } _ { fcx.ccx.tcx.sess.span_err(e.span, "check on non-predicate"); }
} }
ret bot; ret bot;
} }