Skip to content

Commit 38d5071

Browse files
committed
Reflect removal of --no-doc in documentation
- `./x run generate-completions` - Search and replace `--no-doc` with `--all-targets` This is to keep the behaviour the same. - Document `./x test --tests` in `rustc-dev-guide` - Add change info
1 parent 9d64077 commit 38d5071

12 files changed

Lines changed: 62 additions & 32 deletions

File tree

library/alloctests/benches/vec_deque_append.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const BENCH_N: usize = 1000;
88
fn main() {
99
if cfg!(miri) {
1010
// Don't benchmark Miri...
11-
// (Due to bootstrap quirks, this gets picked up by `x.py miri library/alloc --no-doc`.)
11+
// (Due to bootstrap quirks, this gets picked up by `x.py miri library/alloc --all-targets`.)
1212
return;
1313
}
1414
let a: VecDeque<i32> = (0..VECDEQUE_LEN).collect();

src/bootstrap/mk/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ check-aux:
6464
library/core \
6565
library/alloc \
6666
$(BOOTSTRAP_ARGS) \
67-
--no-doc
67+
--all-targets
6868
# Some doctests use file system operations to demonstrate dealing with `Result`,
6969
# so we have to run them with isolation disabled.
7070
$(Q)MIRIFLAGS="-Zmiri-disable-isolation" \

src/bootstrap/src/utils/change_tracker.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn human_readable_changes(changes: &[ChangeInfo]) -> String {
7373
/// Keeps track of major changes made to the bootstrap configuration.
7474
///
7575
/// If you make any major changes (such as adding new values or changing default values),
76-
/// please ensure adding `ChangeInfo` to the end(because the list must be sorted by the merge date)
76+
/// please ensure adding `ChangeInfo` to the end (because the list must be sorted by the merge date)
7777
/// of this list.
7878
pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
7979
ChangeInfo {
@@ -611,4 +611,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
611611
severity: ChangeSeverity::Info,
612612
summary: "New option `llvm.offload-clang-dir` to allow building an in-tree llvm offload and openmp runtime with an external clang.",
613613
},
614+
ChangeInfo {
615+
change_id: 153143,
616+
severity: ChangeSeverity::Warning,
617+
summary: "`x.py test --no-doc` is renamed to `--all-targets`. Additionally `--tests` is added which only executes unit and integration tests.",
618+
},
614619
];

src/doc/rustc-dev-guide/src/tests/intro.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ would require recompiling the entire standard library, and the entirety of
6262
package tests:
6363

6464
* `--doc` — Only runs documentation tests in the package.
65-
* `--no-doc` — Run all tests *except* documentation tests.
65+
* `--all-targets` — Run all tests *except* documentation tests.
66+
* `--tests` — Only runs unit and integration tests
6667

6768
[tidy-unit-tests]: https://github.com/rust-lang/rust/blob/HEAD/src/tools/tidy/src/unit_tests.rs
6869

src/etc/completions/x.fish

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,16 @@ complete -c x -n "__fish_x_using_subcommand test" -l reproducible-artifact -d 'A
329329
complete -c x -n "__fish_x_using_subcommand test" -l set -d 'override options in bootstrap.toml' -r -f
330330
complete -c x -n "__fish_x_using_subcommand test" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}"
331331
complete -c x -n "__fish_x_using_subcommand test" -l no-fail-fast -d 'run all tests regardless of failure'
332-
complete -c x -n "__fish_x_using_subcommand test" -l no-doc -d 'do not run doc tests'
333-
complete -c x -n "__fish_x_using_subcommand test" -l doc -d 'only run doc tests'
332+
complete -c x -n "__fish_x_using_subcommand test" -l all-targets -d 'Run all test targets (no doc tests)'
333+
complete -c x -n "__fish_x_using_subcommand test" -l doc -d 'Only run doc tests'
334+
complete -c x -n "__fish_x_using_subcommand test" -l tests -d 'Only run unit and integration tests'
334335
complete -c x -n "__fish_x_using_subcommand test" -l bless -d 'whether to automatically update stderr/stdout files'
335336
complete -c x -n "__fish_x_using_subcommand test" -l force-rerun -d 'rerun tests even if the inputs are unchanged'
336337
complete -c x -n "__fish_x_using_subcommand test" -l only-modified -d 'only run tests that result has been changed'
337338
complete -c x -n "__fish_x_using_subcommand test" -l rustfix-coverage -d 'enable this to generate a Rustfix coverage file, which is saved in `/<build_base>/rustfix_missing_coverage.txt`'
338339
complete -c x -n "__fish_x_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests'
339340
complete -c x -n "__fish_x_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives'
341+
complete -c x -n "__fish_x_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead'
340342
complete -c x -n "__fish_x_using_subcommand test" -s v -l verbose -d 'use verbose output (-vv for very verbose)'
341343
complete -c x -n "__fish_x_using_subcommand test" -s i -l incremental -d 'use incremental compilation'
342344
complete -c x -n "__fish_x_using_subcommand test" -l include-default-paths -d 'include default paths in addition to the provided ones'
@@ -374,8 +376,10 @@ complete -c x -n "__fish_x_using_subcommand miri" -l reproducible-artifact -d 'A
374376
complete -c x -n "__fish_x_using_subcommand miri" -l set -d 'override options in bootstrap.toml' -r -f
375377
complete -c x -n "__fish_x_using_subcommand miri" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}"
376378
complete -c x -n "__fish_x_using_subcommand miri" -l no-fail-fast -d 'run all tests regardless of failure'
377-
complete -c x -n "__fish_x_using_subcommand miri" -l no-doc -d 'do not run doc tests'
378-
complete -c x -n "__fish_x_using_subcommand miri" -l doc -d 'only run doc tests'
379+
complete -c x -n "__fish_x_using_subcommand miri" -l all-targets -d 'Run all test targets (no doc tests)'
380+
complete -c x -n "__fish_x_using_subcommand miri" -l doc -d 'Only run doc tests'
381+
complete -c x -n "__fish_x_using_subcommand miri" -l tests -d 'Only run unit and integration tests'
382+
complete -c x -n "__fish_x_using_subcommand miri" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead'
379383
complete -c x -n "__fish_x_using_subcommand miri" -s v -l verbose -d 'use verbose output (-vv for very verbose)'
380384
complete -c x -n "__fish_x_using_subcommand miri" -s i -l incremental -d 'use incremental compilation'
381385
complete -c x -n "__fish_x_using_subcommand miri" -l include-default-paths -d 'include default paths in addition to the provided ones'

src/etc/completions/x.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,16 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock {
376376
[CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml')
377377
[CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not')
378378
[CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure')
379-
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests')
380-
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests')
379+
[CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)')
380+
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests')
381+
[CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests')
381382
[CompletionResult]::new('--bless', '--bless', [CompletionResultType]::ParameterName, 'whether to automatically update stderr/stdout files')
382383
[CompletionResult]::new('--force-rerun', '--force-rerun', [CompletionResultType]::ParameterName, 'rerun tests even if the inputs are unchanged')
383384
[CompletionResult]::new('--only-modified', '--only-modified', [CompletionResultType]::ParameterName, 'only run tests that result has been changed')
384385
[CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `/<build_base>/rustfix_missing_coverage.txt`')
385386
[CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests')
386387
[CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives')
388+
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead')
387389
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
388390
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
389391
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation')
@@ -428,8 +430,10 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock {
428430
[CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml')
429431
[CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not')
430432
[CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure')
431-
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests')
432-
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests')
433+
[CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)')
434+
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests')
435+
[CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests')
436+
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead')
433437
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
434438
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
435439
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation')

src/etc/completions/x.py.fish

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,16 @@ complete -c x.py -n "__fish_x.py_using_subcommand test" -l reproducible-artifact
329329
complete -c x.py -n "__fish_x.py_using_subcommand test" -l set -d 'override options in bootstrap.toml' -r -f
330330
complete -c x.py -n "__fish_x.py_using_subcommand test" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}"
331331
complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-fail-fast -d 'run all tests regardless of failure'
332-
complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-doc -d 'do not run doc tests'
333-
complete -c x.py -n "__fish_x.py_using_subcommand test" -l doc -d 'only run doc tests'
332+
complete -c x.py -n "__fish_x.py_using_subcommand test" -l all-targets -d 'Run all test targets (no doc tests)'
333+
complete -c x.py -n "__fish_x.py_using_subcommand test" -l doc -d 'Only run doc tests'
334+
complete -c x.py -n "__fish_x.py_using_subcommand test" -l tests -d 'Only run unit and integration tests'
334335
complete -c x.py -n "__fish_x.py_using_subcommand test" -l bless -d 'whether to automatically update stderr/stdout files'
335336
complete -c x.py -n "__fish_x.py_using_subcommand test" -l force-rerun -d 'rerun tests even if the inputs are unchanged'
336337
complete -c x.py -n "__fish_x.py_using_subcommand test" -l only-modified -d 'only run tests that result has been changed'
337338
complete -c x.py -n "__fish_x.py_using_subcommand test" -l rustfix-coverage -d 'enable this to generate a Rustfix coverage file, which is saved in `/<build_base>/rustfix_missing_coverage.txt`'
338339
complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests'
339340
complete -c x.py -n "__fish_x.py_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives'
341+
complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead'
340342
complete -c x.py -n "__fish_x.py_using_subcommand test" -s v -l verbose -d 'use verbose output (-vv for very verbose)'
341343
complete -c x.py -n "__fish_x.py_using_subcommand test" -s i -l incremental -d 'use incremental compilation'
342344
complete -c x.py -n "__fish_x.py_using_subcommand test" -l include-default-paths -d 'include default paths in addition to the provided ones'
@@ -374,8 +376,10 @@ complete -c x.py -n "__fish_x.py_using_subcommand miri" -l reproducible-artifact
374376
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l set -d 'override options in bootstrap.toml' -r -f
375377
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}"
376378
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l no-fail-fast -d 'run all tests regardless of failure'
377-
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l no-doc -d 'do not run doc tests'
378-
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l doc -d 'only run doc tests'
379+
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l all-targets -d 'Run all test targets (no doc tests)'
380+
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l doc -d 'Only run doc tests'
381+
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l tests -d 'Only run unit and integration tests'
382+
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead'
379383
complete -c x.py -n "__fish_x.py_using_subcommand miri" -s v -l verbose -d 'use verbose output (-vv for very verbose)'
380384
complete -c x.py -n "__fish_x.py_using_subcommand miri" -s i -l incremental -d 'use incremental compilation'
381385
complete -c x.py -n "__fish_x.py_using_subcommand miri" -l include-default-paths -d 'include default paths in addition to the provided ones'

src/etc/completions/x.py.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,16 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
376376
[CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml')
377377
[CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not')
378378
[CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure')
379-
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests')
380-
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests')
379+
[CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)')
380+
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests')
381+
[CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests')
381382
[CompletionResult]::new('--bless', '--bless', [CompletionResultType]::ParameterName, 'whether to automatically update stderr/stdout files')
382383
[CompletionResult]::new('--force-rerun', '--force-rerun', [CompletionResultType]::ParameterName, 'rerun tests even if the inputs are unchanged')
383384
[CompletionResult]::new('--only-modified', '--only-modified', [CompletionResultType]::ParameterName, 'only run tests that result has been changed')
384385
[CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `/<build_base>/rustfix_missing_coverage.txt`')
385386
[CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests')
386387
[CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives')
388+
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead')
387389
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
388390
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
389391
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation')
@@ -428,8 +430,10 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
428430
[CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml')
429431
[CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not')
430432
[CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure')
431-
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests')
432-
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests')
433+
[CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)')
434+
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests')
435+
[CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests')
436+
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead')
433437
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
434438
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
435439
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation')

0 commit comments

Comments
 (0)