Skip to content

Commit 1e54684

Browse files
committed
Reformat typestate error messages so as not to confuse emacs compilation mode
1 parent b02a77d commit 1e54684

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/comp/middle/tstate/auxiliary.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ fn comma_str(args: [@constr_arg_use]) -> str {
5050
fn constraint_to_str(tcx: ty::ctxt, c: sp_constr) -> str {
5151
alt c.node {
5252
ninit(id, i) {
53-
ret #fmt("init(%s id=%d [%s])",
53+
ret #fmt("init(%s id=%d - arising from %s)",
5454
i, id, tcx.sess.span_str(c.span));
5555
}
5656
npred(p, _, args) {
57-
ret path_to_str(p) + "(" + comma_str(args) + ")" + "[" +
58-
tcx.sess.span_str(c.span) + "]";
57+
ret #fmt("%s(%s) - arising from %s",
58+
path_to_str(p),
59+
comma_str(args),
60+
tcx.sess.span_str(c.span));
5961
}
6062
}
6163
}

0 commit comments

Comments
 (0)