Skip to content

Commit

Permalink
Clarify that rustc unwinds on errors, not panics
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Aug 30, 2019
1 parent e296ed3 commit 0353339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_driver/lib.rs
Expand Up @@ -1145,7 +1145,7 @@ fn extra_compiler_flags() -> Option<(Vec<String>, bool)> {

/// Runs a closure and catches unwinds triggered by fatal errors.
///
/// The compiler currently panics with a special sentinel value to abort
/// The compiler currently unwinds with a special sentinel value to abort
/// compilation on fatal errors. This function catches that sentinel and turns
/// the panic into a `Result` instead.
pub fn catch_fatal_errors<F: FnOnce() -> R, R>(f: F) -> Result<R, ErrorReported> {
Expand Down

0 comments on commit 0353339

Please sign in to comment.