Skip to content

Commit

Permalink
librustc: excise Session's now-unused bug methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ben0x539 committed Mar 31, 2016
1 parent 89fcc00 commit 33cc0ed
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/librustc/session/mod.rs
Expand Up @@ -218,22 +218,10 @@ impl Session {
None => self.warn(msg),
}
}
pub fn opt_span_bug<S: Into<MultiSpan>>(&self, opt_sp: Option<S>, msg: &str) -> ! {
match opt_sp {
Some(sp) => self.span_bug(sp, msg),
None => self.bug(msg),
}
}
/// Delay a span_bug() call until abort_if_errors()
pub fn delay_span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {
self.diagnostic().delay_span_bug(sp, msg)
}
pub fn span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
self.diagnostic().span_bug(sp, msg)
}
pub fn bug(&self, msg: &str) -> ! {
self.diagnostic().bug(msg)
}
pub fn note_without_error(&self, msg: &str) {
self.diagnostic().note_without_error(msg)
}
Expand Down Expand Up @@ -281,11 +269,6 @@ impl Session {
pub fn codemap<'a>(&'a self) -> &'a codemap::CodeMap {
self.parse_sess.codemap()
}
// This exists to help with refactoring to eliminate impossible
// cases later on
pub fn impossible_case<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
self.span_bug(sp, &format!("impossible case reached: {}", msg));
}
pub fn verbose(&self) -> bool { self.opts.debugging_opts.verbose }
pub fn time_passes(&self) -> bool { self.opts.debugging_opts.time_passes }
pub fn count_llvm_insns(&self) -> bool {
Expand Down

0 comments on commit 33cc0ed

Please sign in to comment.