Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Rust

Idiom #87 Stop program

Exit immediately.
If some extra cleanup work is executed by the program runtime (not by the OS itself), describe it.

std::process::exit(0);

No destructors on the current stack or any other thread's stack will be run.
return 0;

Only works in main(), actually.

New implementation...