Skip to content

Commit 5459e66

Browse files
committed
docs: Update tests chapter for Termination stabilization
1 parent e7575f9 commit 5459e66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/doc/rustc/src/tests/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ fn it_works() {
1515
```
1616

1717
Tests "pass" if they return without an error. They "fail" if they [panic], or
18-
return a [`Result`] with an error.
18+
return a type such as [`Result`] that implements the [`Termination`] trait
19+
with a non-zero value.
1920

2021
By passing the [`--test` option] to `rustc`, the compiler will build the crate
2122
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
304305
[`libtest`]: ../../test/index.html
305306
[`main` function]: ../../reference/crates-and-source-files.html#main-functions
306307
[`Result`]: ../../std/result/index.html
308+
[`Termination`]: ../../std/process/trait.Termination.html
307309
[`test` cfg option]: ../../reference/conditional-compilation.html#test
308310
[attribute-ignore]: ../../reference/attributes/testing.html#the-ignore-attribute
309311
[attribute-should_panic]: ../../reference/attributes/testing.html#the-should_panic-attribute

0 commit comments

Comments
 (0)