Avoid manually producing FatalError in a couple of places
This commit is contained in:
parent
9a833de62a
commit
8a0adec05b
2 changed files with 3 additions and 3 deletions
|
@ -1024,7 +1024,7 @@ pub fn describe_flag_categories(early_dcx: &EarlyDiagCtxt, matches: &Matches) ->
|
|||
let wall = matches.opt_strs("W");
|
||||
if wall.iter().any(|x| *x == "all") {
|
||||
print_wall_help();
|
||||
rustc_errors::FatalError.raise();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Don't handle -W help here, because we might first load additional lints.
|
||||
|
|
|
@ -1048,8 +1048,8 @@ impl<'a> DiagCtxtHandle<'a> {
|
|||
/// bad results, such as spurious/uninteresting additional errors -- when
|
||||
/// returning an error `Result` is difficult.
|
||||
pub fn abort_if_errors(&self) {
|
||||
if self.has_errors().is_some() {
|
||||
FatalError.raise();
|
||||
if let Some(guar) = self.has_errors() {
|
||||
guar.raise_fatal();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue