Skip to content

Instantly share code, notes, and snippets.

@badboy
Created March 19, 2018 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badboy/47afbbb081e45c92853d79bfb0bdaa57 to your computer and use it in GitHub Desktop.
Save badboy/47afbbb081e45c92853d79bfb0bdaa57 to your computer and use it in GitHub Desktop.
#![feature(termination_trait,termination_trait_lib)]
use std::process::Termination;
struct Exit(i32);
impl Termination for Exit {
fn report(self) -> i32 {
self.0
}
}
fn main() -> Exit {
Exit(42)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment