Termination has stabilized! Fixes #3116.

This commit is contained in:
Carol (Nichols || Goulding) 2022-05-30 18:50:45 -04:00
parent 7265a01185
commit a6142f8d63
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
1 changed files with 3 additions and 4 deletions

View File

@ -875,10 +875,9 @@ integers when they exit: programs that exit successfully return the integer
returns integers from executables to be compatible with this convention.
The `main` function may return any types that implement the
`std::process::Termination` trait. As of this writing, the `Termination` trait
is an unstable feature only available in Nightly Rust, so you cant yet
implement it for your own types in Stable Rust, but you might be able to
someday!
`std::process::Termination` trait, which contains a function `report` that
returns an `ExitCode` Consult the standard library documentation for more
information on implementing the `Termination` trait for your own types.
Now that weve discussed the details of calling `panic!` or returning `Result`,
lets return to the topic of how to decide which is appropriate to use in which