Rollup merge of #22764 - ivanradanov:fileline_help, r=huonw

When warnings and errors occur, the associated help message should not print the same code snippet.
https://github.com/rust-lang/rust/issues/21938
This commit is contained in:
Manish Goregaokar
2015-03-04 17:49:26 +05:30
23 changed files with 76 additions and 50 deletions

View File

@@ -753,6 +753,10 @@ impl<'a> ExtCtxt<'a> {
self.print_backtrace();
self.parse_sess.span_diagnostic.span_help(sp, msg);
}
pub fn fileline_help(&self, sp: Span, msg: &str) {
self.print_backtrace();
self.parse_sess.span_diagnostic.fileline_help(sp, msg);
}
pub fn bug(&self, msg: &str) -> ! {
self.print_backtrace();
self.parse_sess.span_diagnostic.handler().bug(msg);