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:
parent
e49f4471aa
commit
96509b4835
5 changed files with 13 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue