diff options
| author | P1start <rewi-github@whanau.org> | 2014-08-29 18:55:35 +1200 |
|---|---|---|
| committer | P1start <rewi-github@whanau.org> | 2014-09-14 17:48:47 +1200 |
| commit | 06d9cc1d7a8582ff844c21a3fafe09dc97f22895 (patch) | |
| tree | 2c4a1b90c58202708d0ee9f95d1ea932b1f3c4bf /src/libsyntax/parse/parser.rs | |
| parent | 19311b6103b49232709d301af4036dbc0021082c (diff) | |
| download | rust-06d9cc1d7a8582ff844c21a3fafe09dc97f22895.tar.gz rust-06d9cc1d7a8582ff844c21a3fafe09dc97f22895.zip | |
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.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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) } |
