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:
parent
19311b6103
commit
06d9cc1d7a
10 changed files with 52 additions and 22 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue