From 06d9cc1d7a8582ff844c21a3fafe09dc97f22895 Mon Sep 17 00:00:00 2001 From: P1start Date: Fri, 29 Aug 2014 18:55:35 +1200 Subject: Add help diagnostic messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/libsyntax/parse/parser.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index f41362cad41..d4ca285e4db 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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) } -- cgit 1.4.1-3-g733a5