mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Make error_and_exit inline(never) and cold
This commit is contained in:
parent
6102e38f33
commit
39144a198d
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,8 @@ const STD_ERROR_HANDLE: i32 = -12;
|
|||
/// Print each of the given strings to stderr (if it's available; on wasm, nothing will
|
||||
/// be printed) and then immediately exit the program with an error.
|
||||
/// On wasm, this will trap, and on UNIX or Windows it will exit with a code of 1.
|
||||
#[inline(never)]
|
||||
#[cold]
|
||||
#[cfg(any(unix, windows, target_arch = "wasm32"))]
|
||||
pub fn error_and_exit(args: fmt::Arguments) -> ! {
|
||||
use fmt::Write;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue