Make Diagnostic::span_fatal unconditionally raise an error
It had no callers which didn't immediately call `raise()`, and this unifies the behavior with `Session`.
This commit is contained in:
@@ -148,15 +148,11 @@ impl<'a> StringReader<'a> {
|
||||
None => "unterminated block comment",
|
||||
};
|
||||
let last_bpos = self.pos;
|
||||
self.sess
|
||||
.span_diagnostic
|
||||
.struct_span_fatal_with_code(
|
||||
self.mk_sp(start, last_bpos),
|
||||
msg,
|
||||
error_code!(E0758),
|
||||
)
|
||||
.emit();
|
||||
FatalError.raise();
|
||||
self.sess.span_diagnostic.span_fatal_with_code(
|
||||
self.mk_sp(start, last_bpos),
|
||||
msg,
|
||||
error_code!(E0758),
|
||||
);
|
||||
}
|
||||
|
||||
// Skip non-doc comments
|
||||
|
||||
Reference in New Issue
Block a user