We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dfa81f commit ab8a769Copy full SHA for ab8a769
src/librustc/session/mod.rs
@@ -64,12 +64,21 @@ pub struct Session {
64
65
impl Session {
66
pub fn span_fatal(&self, sp: Span, msg: &str) -> ! {
67
+ if self.opts.treat_err_as_bug {
68
+ self.span_bug(sp, msg);
69
+ }
70
self.diagnostic().span_fatal(sp, msg)
71
}
72
pub fn span_fatal_with_code(&self, sp: Span, msg: &str, code: &str) -> ! {
73
74
75
76
self.diagnostic().span_fatal_with_code(sp, msg, code)
77
78
pub fn fatal(&self, msg: &str) -> ! {
79
80
+ self.bug(msg);
81
82
self.diagnostic().handler().fatal(msg)
83
84
pub fn span_err(&self, sp: Span, msg: &str) {
0 commit comments