Skip to content

Commit 1bcb600

Browse files
committed
Fix some comments.
The comment just below the first one describes how the `impl !Send for FatalError` makes it impossible to `panic!(FatalError)`. And the second one should be `panic_any` instead of `panic!`.
1 parent d76661b commit 1bcb600

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

compiler/rustc_span/src/fatal_error.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
/// Used as a return value to signify a fatal error occurred. (It is also
2-
/// used as the argument to panic at the moment, but that will eventually
3-
/// not be true.)
1+
/// Used as a return value to signify a fatal error occurred.
42
#[derive(Copy, Clone, Debug)]
53
#[must_use]
64
pub struct FatalError;
75

86
pub struct FatalErrorMarker;
97

10-
// Don't implement Send on FatalError. This makes it impossible to panic!(FatalError).
8+
// Don't implement Send on FatalError. This makes it impossible to `panic_any!(FatalError)`.
119
// We don't want to invoke the panic handler and print a backtrace for fatal errors.
1210
impl !Send for FatalError {}
1311

0 commit comments

Comments
 (0)