Skip to content

Commit

Permalink
Remove the vestigial ExtCtxt::print_backtrace function.
Browse files Browse the repository at this point in the history
It was added in 2011-08-05 and reduced to a no-op ten days later.
  • Loading branch information
rprichard committed Apr 11, 2015
1 parent fab3295 commit ddbdf51
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/libsyntax/ext/base.rs
Expand Up @@ -605,7 +605,6 @@ impl<'a> ExtCtxt<'a> {
None => self.bug("missing top span")
})
}
pub fn print_backtrace(&self) { }
pub fn backtrace(&self) -> ExpnId { self.backtrace }
pub fn original_span(&self) -> Span {
let mut expn_id = self.backtrace;
Expand Down Expand Up @@ -700,7 +699,6 @@ impl<'a> ExtCtxt<'a> {
/// substitute; we never hit resolve/type-checking so the dummy
/// value doesn't have to match anything)
pub fn span_fatal(&self, sp: Span, msg: &str) -> ! {
self.print_backtrace();
panic!(self.parse_sess.span_diagnostic.span_fatal(sp, msg));
}

Expand All @@ -710,35 +708,27 @@ impl<'a> ExtCtxt<'a> {
/// Compilation will be stopped in the near future (at the end of
/// the macro expansion phase).
pub fn span_err(&self, sp: Span, msg: &str) {
self.print_backtrace();
self.parse_sess.span_diagnostic.span_err(sp, msg);
}
pub fn span_warn(&self, sp: Span, msg: &str) {
self.print_backtrace();
self.parse_sess.span_diagnostic.span_warn(sp, msg);
}
pub fn span_unimpl(&self, sp: Span, msg: &str) -> ! {
self.print_backtrace();
self.parse_sess.span_diagnostic.span_unimpl(sp, msg);
}
pub fn span_bug(&self, sp: Span, msg: &str) -> ! {
self.print_backtrace();
self.parse_sess.span_diagnostic.span_bug(sp, msg);
}
pub fn span_note(&self, sp: Span, msg: &str) {
self.print_backtrace();
self.parse_sess.span_diagnostic.span_note(sp, msg);
}
pub fn span_help(&self, sp: Span, msg: &str) {
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);
}
pub fn trace_macros(&self) -> bool {
Expand Down
2 changes: 0 additions & 2 deletions src/libsyntax/ext/log_syntax.rs
Expand Up @@ -26,8 +26,6 @@ pub fn expand_syntax_ext<'cx>(cx: &'cx mut base::ExtCtxt,
return base::DummyResult::any(sp);
}

cx.print_backtrace();

println!("{}", print::pprust::tts_to_string(tts));

// any so that `log_syntax` can be invoked as an expression and item.
Expand Down

0 comments on commit ddbdf51

Please sign in to comment.