Skip to content

Commit 4629b51

Browse files
committed
Remove the vestigial ExtCtxt::print_backtrace function.
It was added in 2011-08-05 and reduced to a no-op ten days later.
1 parent 4ded731 commit 4629b51

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/libsyntax/ext/base.rs

-10
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,6 @@ impl<'a> ExtCtxt<'a> {
603603
None => self.bug("missing top span")
604604
})
605605
}
606-
pub fn print_backtrace(&self) { }
607606
pub fn backtrace(&self) -> ExpnId { self.backtrace }
608607
pub fn original_span(&self) -> Span {
609608
let mut expn_id = self.backtrace;
@@ -698,7 +697,6 @@ impl<'a> ExtCtxt<'a> {
698697
/// substitute; we never hit resolve/type-checking so the dummy
699698
/// value doesn't have to match anything)
700699
pub fn span_fatal(&self, sp: Span, msg: &str) -> ! {
701-
self.print_backtrace();
702700
panic!(self.parse_sess.span_diagnostic.span_fatal(sp, msg));
703701
}
704702

@@ -708,35 +706,27 @@ impl<'a> ExtCtxt<'a> {
708706
/// Compilation will be stopped in the near future (at the end of
709707
/// the macro expansion phase).
710708
pub fn span_err(&self, sp: Span, msg: &str) {
711-
self.print_backtrace();
712709
self.parse_sess.span_diagnostic.span_err(sp, msg);
713710
}
714711
pub fn span_warn(&self, sp: Span, msg: &str) {
715-
self.print_backtrace();
716712
self.parse_sess.span_diagnostic.span_warn(sp, msg);
717713
}
718714
pub fn span_unimpl(&self, sp: Span, msg: &str) -> ! {
719-
self.print_backtrace();
720715
self.parse_sess.span_diagnostic.span_unimpl(sp, msg);
721716
}
722717
pub fn span_bug(&self, sp: Span, msg: &str) -> ! {
723-
self.print_backtrace();
724718
self.parse_sess.span_diagnostic.span_bug(sp, msg);
725719
}
726720
pub fn span_note(&self, sp: Span, msg: &str) {
727-
self.print_backtrace();
728721
self.parse_sess.span_diagnostic.span_note(sp, msg);
729722
}
730723
pub fn span_help(&self, sp: Span, msg: &str) {
731-
self.print_backtrace();
732724
self.parse_sess.span_diagnostic.span_help(sp, msg);
733725
}
734726
pub fn fileline_help(&self, sp: Span, msg: &str) {
735-
self.print_backtrace();
736727
self.parse_sess.span_diagnostic.fileline_help(sp, msg);
737728
}
738729
pub fn bug(&self, msg: &str) -> ! {
739-
self.print_backtrace();
740730
self.parse_sess.span_diagnostic.handler().bug(msg);
741731
}
742732
pub fn trace_macros(&self) -> bool {

src/libsyntax/ext/log_syntax.rs

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ pub fn expand_syntax_ext<'cx>(cx: &'cx mut base::ExtCtxt,
2626
return base::DummyResult::any(sp);
2727
}
2828

29-
cx.print_backtrace();
30-
3129
println!("{}", print::pprust::tts_to_string(tts));
3230

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

0 commit comments

Comments
 (0)