1
Fork 0

Add help diagnostic messages

This adds ‘help’ diagnostic messages to rustc. This is used for anything that
provides help to the user, particularly the `--explain` messages that were
previously integrated into the relevant error message.
This commit is contained in:
P1start 2014-08-29 18:55:35 +12:00
parent 19311b6103
commit 06d9cc1d7a
10 changed files with 52 additions and 22 deletions

View file

@ -959,6 +959,9 @@ impl<'a> Parser<'a> {
pub fn span_note(&mut self, sp: Span, m: &str) {
self.sess.span_diagnostic.span_note(sp, m)
}
pub fn span_help(&mut self, sp: Span, m: &str) {
self.sess.span_diagnostic.span_help(sp, m)
}
pub fn bug(&mut self, m: &str) -> ! {
self.sess.span_diagnostic.span_bug(self.span, m)
}