rustc: Make return value checking warnings a little prettier. Also introduce a new "note" diagnostic level.

This commit is contained in:
Patrick Walton 2011-05-17 14:12:49 -07:00
parent 5047ab0b0c
commit f300de2963
2 changed files with 10 additions and 3 deletions

View file

@ -102,6 +102,11 @@ state obj session(ast::crate_num cnum,
emit_diagnostic(sp, msg, "warning", 11u8, cm);
}
fn span_note(span sp, str msg) {
// FIXME: Use constants, but rustboot doesn't know how to export them.
emit_diagnostic(sp, msg, "note", 10u8, cm);
}
fn bug(str msg) {
log_err #fmt("error: internal compiler error %s", msg);
fail;