Skip to content

Commit 7d99d6d

Browse files
committed
Update for review comments.
1 parent 87ac39c commit 7d99d6d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

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

+10-9
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ crate. The `--test` flag will make the following changes:
2626
* Links the executable with [`libtest`], the test harness that is part of the
2727
standard library, which handles running the tests.
2828
* Synthesizes a [`main` function] which will process command-line arguments
29-
and run the tests. If the crate already has a `main` function, it will be
30-
replaced.
29+
and run the tests. This new `main` function will replace any existing `main`
30+
function as the entry point of the executable, though the existing `main`
31+
will still be compiled.
3132
* Enables the [`test` cfg option], which allows your code to use conditional
3233
compilation to detect if it is being built as a test.
3334
* Enables building of functions annotated with the [`test`][attribute-test]
@@ -83,11 +84,11 @@ behavior.
8384
8485
### Filters
8586

86-
Bare arguments (those without a `-` prefix) are treated as filters which will
87-
only run tests whose name matches one of those strings. The filter will match
88-
any substring found in the full path of the test function. For example, if the
89-
test function `it_works` is located in the module `utils::paths::tests`, then
90-
any of the filters `works`, `path`, `utils::`, or
87+
Positional arguments (those without a `-` prefix) are treated as filters which
88+
will only run tests whose name matches one of those strings. The filter will
89+
match any substring found in the full path of the test function. For example,
90+
if the test function `it_works` is located in the module
91+
`utils::paths::tests`, then any of the filters `works`, `path`, `utils::`, or
9192
`utils::paths::tests::it_works` will match that test.
9293

9394
See [Selection options](#selection-options) for more options to control which
@@ -230,7 +231,7 @@ Controls the format of the output. Valid options:
230231

231232
#### `--logfile` _PATH_
232233

233-
Writes the results to the tests to the given file.
234+
Writes the results of the tests to the given file.
234235

235236
#### `--report-time` _FORMAT_
236237

@@ -244,7 +245,7 @@ docs](../../unstable-book/compiler-flags/report-time.html) for more information.
244245
Some CLI options are added in an "unstable" state, where they are intended for
245246
experimentation and testing to determine if the option works correctly, has
246247
the right design, and is useful. The option may not work correctly, break, or
247-
change at at any time. To signal that you acknowledge that you are using an
248+
change at any time. To signal that you acknowledge that you are using an
248249
unstable option, they require passing the `-Z unstable-options` command-line
249250
flag.
250251

0 commit comments

Comments
 (0)