diff options
| author | Eric Huss <eric@huss.org> | 2022-04-14 16:42:49 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2022-04-14 16:44:43 -0700 |
| commit | 5459e6637ae4cd86367927753df6e7fbe1c503e1 (patch) | |
| tree | 975e6fbaf395d664d8eb26bfea1b23d23751b94c /src/doc/rustc | |
| parent | e7575f9670f3c837def3d186ae09366c75c7632e (diff) | |
| download | rust-5459e6637ae4cd86367927753df6e7fbe1c503e1.tar.gz rust-5459e6637ae4cd86367927753df6e7fbe1c503e1.zip | |
docs: Update tests chapter for Termination stabilization
Diffstat (limited to 'src/doc/rustc')
| -rw-r--r-- | src/doc/rustc/src/tests/index.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/doc/rustc/src/tests/index.md b/src/doc/rustc/src/tests/index.md index 0e0eb85db74..32baed9c944 100644 --- a/src/doc/rustc/src/tests/index.md +++ b/src/doc/rustc/src/tests/index.md @@ -15,7 +15,8 @@ fn it_works() { ``` Tests "pass" if they return without an error. They "fail" if they [panic], or -return a [`Result`] with an error. +return a type such as [`Result`] that implements the [`Termination`] trait +with a non-zero value. By passing the [`--test` option] to `rustc`, the compiler will build the crate in a special mode to construct an executable that will run the tests in the @@ -304,6 +305,7 @@ Experimental support for using custom test harnesses is available on the [`libtest`]: ../../test/index.html [`main` function]: ../../reference/crates-and-source-files.html#main-functions [`Result`]: ../../std/result/index.html +[`Termination`]: ../../std/process/trait.Termination.html [`test` cfg option]: ../../reference/conditional-compilation.html#test [attribute-ignore]: ../../reference/attributes/testing.html#the-ignore-attribute [attribute-should_panic]: ../../reference/attributes/testing.html#the-should_panic-attribute |
