Skip to content

Commit 33cc0ed

Browse files
committed
librustc: excise Session's now-unused bug methods
1 parent 89fcc00 commit 33cc0ed

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/librustc/session/mod.rs

-17
Original file line numberDiff line numberDiff line change
@@ -218,22 +218,10 @@ impl Session {
218218
None => self.warn(msg),
219219
}
220220
}
221-
pub fn opt_span_bug<S: Into<MultiSpan>>(&self, opt_sp: Option<S>, msg: &str) -> ! {
222-
match opt_sp {
223-
Some(sp) => self.span_bug(sp, msg),
224-
None => self.bug(msg),
225-
}
226-
}
227221
/// Delay a span_bug() call until abort_if_errors()
228222
pub fn delay_span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {
229223
self.diagnostic().delay_span_bug(sp, msg)
230224
}
231-
pub fn span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
232-
self.diagnostic().span_bug(sp, msg)
233-
}
234-
pub fn bug(&self, msg: &str) -> ! {
235-
self.diagnostic().bug(msg)
236-
}
237225
pub fn note_without_error(&self, msg: &str) {
238226
self.diagnostic().note_without_error(msg)
239227
}
@@ -281,11 +269,6 @@ impl Session {
281269
pub fn codemap<'a>(&'a self) -> &'a codemap::CodeMap {
282270
self.parse_sess.codemap()
283271
}
284-
// This exists to help with refactoring to eliminate impossible
285-
// cases later on
286-
pub fn impossible_case<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> ! {
287-
self.span_bug(sp, &format!("impossible case reached: {}", msg));
288-
}
289272
pub fn verbose(&self) -> bool { self.opts.debugging_opts.verbose }
290273
pub fn time_passes(&self) -> bool { self.opts.debugging_opts.time_passes }
291274
pub fn count_llvm_insns(&self) -> bool {

0 commit comments

Comments
 (0)