summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorTshepang Mbambo <tshepang@gmail.com>2023-07-08 04:54:25 +0200
committerGitHub <noreply@github.com>2023-07-08 11:54:25 +0900
commita50154b69c5649f59cafe8694fade999439b9f0b (patch)
treee36de24efe383b921fbd4d097b067eedad3e0c1f /src/doc/rustc-dev-guide
parent57c24559febb55bfddc1c715fd5c687985f21c09 (diff)
downloadrust-a50154b69c5649f59cafe8694fade999439b9f0b.tar.gz
rust-a50154b69c5649f59cafe8694fade999439b9f0b.zip
improve explanation of placing tests in separate file (#1721)
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/tests/intro.md13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/intro.md b/src/doc/rustc-dev-guide/src/tests/intro.md
index aad77e255e4..647d1fbeadf 100644
--- a/src/doc/rustc-dev-guide/src/tests/intro.md
+++ b/src/doc/rustc-dev-guide/src/tests/intro.md
@@ -43,9 +43,9 @@ The standard library relies very heavily on documentation tests to cover its fun
 However, unit tests and integration tests can also be used as needed.
 Almost all of the compiler packages have doctests disabled.
 
-The standard library and compiler always place all unit tests in a separate `tests` file
-(this is enforced in [tidy][tidy-unit-tests]).
-This approach ensures that when the test file is changed, the crate does not need to be recompiled.
+All standard library and compiler unit tests are placed in separate `tests` file
+(which is enforced in [tidy][tidy-unit-tests]).
+This ensures that when the test file is changed, the crate does not need to be recompiled.
 For example:
 
 ```rust,ignore
@@ -53,10 +53,9 @@ For example:
 mod tests;
 ```
 
-If it wasn't done this way, and the tests were placed in the same file as the source,
-then changing or adding a test would cause the crate you are working on to be recompiled.
-If you were working on something like `core`,
-then that would require recompiling the entire standard library, and the entirety of `rustc`.
+If it wasn't done this way,
+and you were working on something like `core`,
+that would require recompiling the entire standard library, and the entirety of `rustc`.
 
 `./x test` includes some CLI options for controlling the behavior with these tests: