rust/compiler/rustc/src
Chris Denton 6d36c8a5fc
Return ExitCode from rustc_driver::main
This makes rustc simply return an exit code from main rather than calling `std::process::exit` with an exit code. This means that drops run normally and the process exits cleanly.

Also instead of hard coding success and failure codes this uses `ExitCode::SUCCESS` and `ExitCode::FAILURE`, which in turn effectively uses `libc::EXIT_SUCCESS` and `libc::EXIT_FAILURE` (via std). These are `0` and `1` respectively for all currently supported host platforms so it doesn't actually change the exit code.
2026-01-23 21:04:27 +00:00
..
main.rs Return ExitCode from rustc_driver::main 2026-01-23 21:04:27 +00:00