We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 73ec27d + 2433d37 commit c44455aCopy full SHA for c44455a
library/std/src/process.rs
@@ -106,6 +106,7 @@ mod tests;
106
107
use crate::io::prelude::*;
108
109
+use crate::convert::Infallible;
110
use crate::ffi::OsStr;
111
use crate::fmt;
112
use crate::fs;
@@ -2065,6 +2066,14 @@ impl<E: fmt::Debug> Termination for Result<!, E> {
2065
2066
}
2067
2068
2069
+#[unstable(feature = "termination_trait_lib", issue = "43301")]
2070
+impl<E: fmt::Debug> Termination for Result<Infallible, E> {
2071
+ fn report(self) -> i32 {
2072
+ let Err(err) = self;
2073
+ Err::<!, _>(err).report()
2074
+ }
2075
+}
2076
+
2077
#[unstable(feature = "termination_trait_lib", issue = "43301")]
2078
impl Termination for ExitCode {
2079
#[inline]
0 commit comments