diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 6e4c6e4c366e4..99e2becedcbad 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -1625,6 +1625,16 @@ impl Termination for Result<(), E> { } } +#[unstable(feature = "termination_trait_lib", issue = "43301")] +impl Termination for Option { + fn report(self) -> i32 { + match self { + Some(v) => v.report(), + None => 1, + } + } +} + #[unstable(feature = "termination_trait_lib", issue = "43301")] impl Termination for ! { fn report(self) -> i32 { self }