Skip to content

Commit 2a73c4f

Browse files
committed
Add line breaks to typestate error messages
1 parent 11db05c commit 2a73c4f

File tree

1 file changed

+4
-4
lines changed
  • src/comp/middle/tstate

1 file changed

+4
-4
lines changed

src/comp/middle/tstate/ck.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ fn check_states_expr(&fn_ctxt fcx, @expr e) -> () {
7272
auto s = "";
7373
s += ("Unsatisfied precondition constraint for expression:\n");
7474
s += util::common::expr_to_str(e);
75-
s += ("Precondition: ");
75+
s += ("\nPrecondition:\n");
7676
s += bitv_to_str(fcx.enclosing, prec);
77-
s += ("Prestate: ");
77+
s += ("\nPrestate:\n");
7878
s += bitv_to_str(fcx.enclosing, pres);
7979
fcx.ccx.tcx.sess.span_err(e.span, s);
8080
}
@@ -98,9 +98,9 @@ fn check_states_stmt(&fn_ctxt fcx, &stmt s) -> () {
9898
auto ss = "";
9999
ss += ("Unsatisfied precondition constraint for statement:\n");
100100
ss += util::common::stmt_to_str(s);
101-
ss += ("Precondition: ");
101+
ss += ("\nPrecondition:\n");
102102
ss += bitv_to_str(fcx.enclosing, prec);
103-
ss += ("Prestate: ");
103+
ss += ("\nPrestate: \n");
104104
ss += bitv_to_str(fcx.enclosing, pres);
105105
fcx.ccx.tcx.sess.span_err(s.span, ss);
106106
}

0 commit comments

Comments
 (0)