From 9d6407799fd0addc429b84ed60fa562a164f34f4 Mon Sep 17 00:00:00 2001 From: Urhengulas Date: Thu, 26 Feb 2026 13:17:10 +0100 Subject: [PATCH 1/3] Allow running unit/integration tests without doc tests and benches --- src/bootstrap/src/core/build_steps/test.rs | 44 ++++++++++------------ src/bootstrap/src/core/config/flags.rs | 43 ++++++++++++--------- src/bootstrap/src/lib.rs | 24 ++++++++---- 3 files changed, 61 insertions(+), 50 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 71353397b207a..d130362502255 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -41,7 +41,7 @@ use crate::utils::helpers::{ linker_args, linker_flags, t, target_supports_cranelift_backend, up_to_date, }; use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests}; -use crate::{CLang, CodegenBackendKind, DocTests, GitRepo, Mode, PathSet, envify}; +use crate::{CLang, CodegenBackendKind, GitRepo, Mode, PathSet, TestTarget, envify}; mod compiletest; @@ -174,7 +174,7 @@ You can skip linkcheck with --skip src/tools/linkchecker" ); run_cargo_test(cargo, &[], &[], "linkchecker self tests", bootstrap_host, builder); - if builder.doc_tests == DocTests::No { + if !builder.test_target.runs_doctests() { return; } @@ -807,15 +807,14 @@ impl Step for CargoMiri { // We're not using `prepare_cargo_test` so we have to do this ourselves. // (We're not using that as the test-cargo-miri crate is not known to bootstrap.) - match builder.doc_tests { - DocTests::Yes => {} - DocTests::No => { - cargo.args(["--lib", "--bins", "--examples", "--tests", "--benches"]); + match builder.test_target { + TestTarget::AllTargets => { + cargo.args(["--lib", "--bins", "--examples", "--tests", "--benches"]) } - DocTests::Only => { - cargo.arg("--doc"); - } - } + TestTarget::Default => &mut cargo, + TestTarget::DocOnly => cargo.arg("--doc"), + TestTarget::Tests => cargo.arg("--tests"), + }; cargo.arg("--").args(builder.config.test_args()); // Finally, run everything. @@ -1193,7 +1192,7 @@ impl Step for RustdocGUI { fn is_default_step(builder: &Builder<'_>) -> bool { builder.config.nodejs.is_some() - && builder.doc_tests != DocTests::Only + && builder.test_target != TestTarget::DocOnly && get_browser_ui_test_version(builder).is_some() } @@ -1283,7 +1282,7 @@ impl Step for Tidy { } fn is_default_step(builder: &Builder<'_>) -> bool { - builder.doc_tests != DocTests::Only + builder.test_target != TestTarget::DocOnly } fn make_run(run: RunConfig<'_>) { @@ -1839,7 +1838,7 @@ impl Step for Compiletest { } fn run(self, builder: &Builder<'_>) { - if builder.doc_tests == DocTests::Only { + if builder.test_target == TestTarget::DocOnly { return; } @@ -2957,15 +2956,12 @@ fn prepare_cargo_test( cargo.arg("--message-format=json"); } - match builder.doc_tests { - DocTests::Only => { - cargo.arg("--doc"); - } - DocTests::No => { - cargo.args(["--bins", "--examples", "--tests", "--benches"]); - } - DocTests::Yes => {} - } + match builder.test_target { + TestTarget::AllTargets => cargo.args(["--bins", "--examples", "--tests", "--benches"]), + TestTarget::Default => &mut cargo, + TestTarget::DocOnly => cargo.arg("--doc"), + TestTarget::Tests => cargo.arg("--tests"), + }; for krate in crates { cargo.arg("-p").arg(krate); @@ -3834,7 +3830,7 @@ impl Step for CodegenCranelift { let host = run.build_triple(); let compilers = RustcPrivateCompilers::new(run.builder, run.builder.top_stage, host); - if builder.doc_tests == DocTests::Only { + if builder.test_target == TestTarget::DocOnly { return; } @@ -3955,7 +3951,7 @@ impl Step for CodegenGCC { let host = run.build_triple(); let compilers = RustcPrivateCompilers::new(run.builder, run.builder.top_stage, host); - if builder.doc_tests == DocTests::Only { + if builder.test_target == TestTarget::DocOnly { return; } diff --git a/src/bootstrap/src/core/config/flags.rs b/src/bootstrap/src/core/config/flags.rs index bf089d25ffec8..c86f0de7551c9 100644 --- a/src/bootstrap/src/core/config/flags.rs +++ b/src/bootstrap/src/core/config/flags.rs @@ -15,7 +15,7 @@ use crate::core::build_steps::setup::Profile; use crate::core::builder::{Builder, Kind}; use crate::core::config::Config; use crate::core::config::target_selection::{TargetSelectionList, target_selection_list}; -use crate::{Build, CodegenBackendKind, DocTests}; +use crate::{Build, CodegenBackendKind, TestTarget}; #[derive(Copy, Clone, Default, Debug, ValueEnum)] pub enum Color { @@ -357,7 +357,7 @@ pub enum Subcommand { should be compiled and run. For example: ./x.py test tests/ui ./x.py test library/std --test-args hash_map - ./x.py test library/std --stage 0 --no-doc + ./x.py test library/std --stage 0 --all-targets ./x.py test tests/ui --bless ./x.py test tests/ui --compare-mode next-solver Note that `test tests/* --stage N` does NOT depend on `build compiler/rustc --stage N`; @@ -382,11 +382,14 @@ pub enum Subcommand { #[arg(long, value_name = "ARGS", allow_hyphen_values(true))] compiletest_rustc_args: Vec, #[arg(long)] - /// do not run doc tests - no_doc: bool, + /// Run all test targets (no doc tests) + all_targets: bool, #[arg(long)] - /// only run doc tests + /// Only run doc tests doc: bool, + /// Only run unit and integration tests + #[arg(long)] + tests: bool, #[arg(long)] /// whether to automatically update stderr/stdout files bless: bool, @@ -436,11 +439,14 @@ pub enum Subcommand { /// (e.g. libtest, compiletest or rustdoc) test_args: Vec, #[arg(long)] - /// do not run doc tests - no_doc: bool, + /// Run all test targets (no doc tests) + all_targets: bool, #[arg(long)] - /// only run doc tests + /// Only run doc tests doc: bool, + /// Only run unit and integration tests + #[arg(long)] + tests: bool, }, /// Build and run some benchmarks Bench { @@ -552,18 +558,19 @@ impl Subcommand { } } - pub fn doc_tests(&self) -> DocTests { + pub fn test_target(&self) -> TestTarget { match *self { - Subcommand::Test { doc, no_doc, .. } | Subcommand::Miri { no_doc, doc, .. } => { - if doc { - DocTests::Only - } else if no_doc { - DocTests::No - } else { - DocTests::Yes + Subcommand::Test { all_targets, doc, tests, .. } + | Subcommand::Miri { all_targets, doc, tests, .. } => match (all_targets, doc, tests) { + (true, true, _) | (true, _, true) | (_, true, true) => { + panic!("You can only set one of `--all-targets`, `--doc` and `--tests`.") } - } - _ => DocTests::Yes, + (true, false, false) => TestTarget::AllTargets, + (false, true, false) => TestTarget::DocOnly, + (false, false, true) => TestTarget::Tests, + (false, false, false) => TestTarget::Default, + }, + _ => TestTarget::Default, } } diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index b9a914f53cec1..f1303814f6d72 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -177,13 +177,21 @@ impl std::str::FromStr for CodegenBackendKind { } #[derive(PartialEq, Eq, Copy, Clone, Debug)] -pub enum DocTests { - /// Run normal tests and doc tests (default). - Yes, - /// Do not run any doc tests. - No, +pub enum TestTarget { + /// Run unit, integration and doc tests (default). + Default, + /// Run unit, integration, doc tests, examples, bins, benchmarks (no doc tests). + AllTargets, /// Only run doc tests. - Only, + DocOnly, + /// Only run unit and integration tests. + Tests, +} + +impl TestTarget { + fn runs_doctests(&self) -> bool { + matches!(self, TestTarget::DocOnly | TestTarget::Default) + } } pub enum GitRepo { @@ -222,7 +230,7 @@ pub struct Build { in_tree_gcc_info: GitInfo, local_rebuild: bool, fail_fast: bool, - doc_tests: DocTests, + test_target: TestTarget, verbosity: usize, /// Build triple for the pre-compiled snapshot compiler. @@ -540,7 +548,7 @@ impl Build { initial_sysroot: config.initial_sysroot.clone(), local_rebuild: config.local_rebuild, fail_fast: config.cmd.fail_fast(), - doc_tests: config.cmd.doc_tests(), + test_target: config.cmd.test_target(), verbosity: config.exec_ctx.verbosity as usize, host_target: config.host_target, From 2a2cafa722f6c7b57ff2ca1b0a57bb56bf3d07fa Mon Sep 17 00:00:00 2001 From: Urhengulas Date: Thu, 26 Feb 2026 16:26:34 +0100 Subject: [PATCH 2/3] 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 --- library/alloctests/benches/vec_deque_append.rs | 2 +- src/bootstrap/mk/Makefile.in | 2 +- src/bootstrap/src/utils/change_tracker.rs | 7 ++++++- src/doc/rustc-dev-guide/src/tests/intro.md | 3 ++- src/etc/completions/x.fish | 10 ++++++---- src/etc/completions/x.ps1 | 10 ++++++---- src/etc/completions/x.py.fish | 10 ++++++---- src/etc/completions/x.py.ps1 | 10 ++++++---- src/etc/completions/x.py.sh | 4 ++-- src/etc/completions/x.py.zsh | 10 ++++++---- src/etc/completions/x.sh | 4 ++-- src/etc/completions/x.zsh | 10 ++++++---- 12 files changed, 50 insertions(+), 32 deletions(-) diff --git a/library/alloctests/benches/vec_deque_append.rs b/library/alloctests/benches/vec_deque_append.rs index 7c805da973763..71dc0813f9cc4 100644 --- a/library/alloctests/benches/vec_deque_append.rs +++ b/library/alloctests/benches/vec_deque_append.rs @@ -8,7 +8,7 @@ const BENCH_N: usize = 1000; fn main() { if cfg!(miri) { // Don't benchmark Miri... - // (Due to bootstrap quirks, this gets picked up by `x.py miri library/alloc --no-doc`.) + // (Due to bootstrap quirks, this gets picked up by `x.py miri library/alloc --all-targets`.) return; } let a: VecDeque = (0..VECDEQUE_LEN).collect(); diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index 5f956f03ecb18..0268906a4664c 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -64,7 +64,7 @@ check-aux: library/core \ library/alloc \ $(BOOTSTRAP_ARGS) \ - --no-doc + --all-targets # Some doctests use file system operations to demonstrate dealing with `Result`, # so we have to run them with isolation disabled. $(Q)MIRIFLAGS="-Zmiri-disable-isolation" \ diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs index 1077077cb97a2..f8af8f3bec031 100644 --- a/src/bootstrap/src/utils/change_tracker.rs +++ b/src/bootstrap/src/utils/change_tracker.rs @@ -73,7 +73,7 @@ pub fn human_readable_changes(changes: &[ChangeInfo]) -> String { /// Keeps track of major changes made to the bootstrap configuration. /// /// If you make any major changes (such as adding new values or changing default values), -/// please ensure adding `ChangeInfo` to the end(because the list must be sorted by the merge date) +/// please ensure adding `ChangeInfo` to the end (because the list must be sorted by the merge date) /// of this list. pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[ ChangeInfo { @@ -611,4 +611,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[ severity: ChangeSeverity::Info, summary: "New option `llvm.offload-clang-dir` to allow building an in-tree llvm offload and openmp runtime with an external clang.", }, + ChangeInfo { + change_id: 153143, + severity: ChangeSeverity::Warning, + summary: "`x.py test --no-doc` is renamed to `--all-targets`. Additionally `--tests` is added which only executes unit and integration tests.", + }, ]; diff --git a/src/doc/rustc-dev-guide/src/tests/intro.md b/src/doc/rustc-dev-guide/src/tests/intro.md index c13f8bde29945..82fb9597cb500 100644 --- a/src/doc/rustc-dev-guide/src/tests/intro.md +++ b/src/doc/rustc-dev-guide/src/tests/intro.md @@ -62,7 +62,8 @@ would require recompiling the entire standard library, and the entirety of package tests: * `--doc` — Only runs documentation tests in the package. -* `--no-doc` — Run all tests *except* documentation tests. +* `--all-targets` — Run all tests *except* documentation tests. +* `--tests` — Only runs unit and integration tests [tidy-unit-tests]: https://github.com/rust-lang/rust/blob/HEAD/src/tools/tidy/src/unit_tests.rs diff --git a/src/etc/completions/x.fish b/src/etc/completions/x.fish index a837be680dcdd..7aa1e27efe493 100644 --- a/src/etc/completions/x.fish +++ b/src/etc/completions/x.fish @@ -329,8 +329,9 @@ complete -c x -n "__fish_x_using_subcommand test" -l reproducible-artifact -d 'A complete -c x -n "__fish_x_using_subcommand test" -l set -d 'override options in bootstrap.toml' -r -f 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''}" complete -c x -n "__fish_x_using_subcommand test" -l no-fail-fast -d 'run all tests regardless of failure' -complete -c x -n "__fish_x_using_subcommand test" -l no-doc -d 'do not run doc tests' -complete -c x -n "__fish_x_using_subcommand test" -l doc -d 'only run doc tests' +complete -c x -n "__fish_x_using_subcommand test" -l all-targets -d 'Run all test targets (no doc tests)' +complete -c x -n "__fish_x_using_subcommand test" -l doc -d 'Only run doc tests' +complete -c x -n "__fish_x_using_subcommand test" -l tests -d 'Only run unit and integration tests' complete -c x -n "__fish_x_using_subcommand test" -l bless -d 'whether to automatically update stderr/stdout files' complete -c x -n "__fish_x_using_subcommand test" -l force-rerun -d 'rerun tests even if the inputs are unchanged' complete -c x -n "__fish_x_using_subcommand test" -l only-modified -d 'only run tests that result has been changed' @@ -374,8 +375,9 @@ complete -c x -n "__fish_x_using_subcommand miri" -l reproducible-artifact -d 'A complete -c x -n "__fish_x_using_subcommand miri" -l set -d 'override options in bootstrap.toml' -r -f 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''}" complete -c x -n "__fish_x_using_subcommand miri" -l no-fail-fast -d 'run all tests regardless of failure' -complete -c x -n "__fish_x_using_subcommand miri" -l no-doc -d 'do not run doc tests' -complete -c x -n "__fish_x_using_subcommand miri" -l doc -d 'only run doc tests' +complete -c x -n "__fish_x_using_subcommand miri" -l all-targets -d 'Run all test targets (no doc tests)' +complete -c x -n "__fish_x_using_subcommand miri" -l doc -d 'Only run doc tests' +complete -c x -n "__fish_x_using_subcommand miri" -l tests -d 'Only run unit and integration tests' complete -c x -n "__fish_x_using_subcommand miri" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x -n "__fish_x_using_subcommand miri" -s i -l incremental -d 'use incremental compilation' complete -c x -n "__fish_x_using_subcommand miri" -l include-default-paths -d 'include default paths in addition to the provided ones' diff --git a/src/etc/completions/x.ps1 b/src/etc/completions/x.ps1 index 1a02adbddfea7..3aa06ac97d482 100644 --- a/src/etc/completions/x.ps1 +++ b/src/etc/completions/x.ps1 @@ -376,8 +376,9 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') [CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure') - [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests') - [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests') + [CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)') + [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests') + [CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests') [CompletionResult]::new('--bless', '--bless', [CompletionResultType]::ParameterName, 'whether to automatically update stderr/stdout files') [CompletionResult]::new('--force-rerun', '--force-rerun', [CompletionResultType]::ParameterName, 'rerun tests even if the inputs are unchanged') [CompletionResult]::new('--only-modified', '--only-modified', [CompletionResultType]::ParameterName, 'only run tests that result has been changed') @@ -428,8 +429,9 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') [CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure') - [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests') - [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests') + [CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)') + [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests') + [CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation') diff --git a/src/etc/completions/x.py.fish b/src/etc/completions/x.py.fish index 63b7987fb290e..55938ea476975 100644 --- a/src/etc/completions/x.py.fish +++ b/src/etc/completions/x.py.fish @@ -329,8 +329,9 @@ complete -c x.py -n "__fish_x.py_using_subcommand test" -l reproducible-artifact complete -c x.py -n "__fish_x.py_using_subcommand test" -l set -d 'override options in bootstrap.toml' -r -f 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''}" complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-fail-fast -d 'run all tests regardless of failure' -complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-doc -d 'do not run doc tests' -complete -c x.py -n "__fish_x.py_using_subcommand test" -l doc -d 'only run doc tests' +complete -c x.py -n "__fish_x.py_using_subcommand test" -l all-targets -d 'Run all test targets (no doc tests)' +complete -c x.py -n "__fish_x.py_using_subcommand test" -l doc -d 'Only run doc tests' +complete -c x.py -n "__fish_x.py_using_subcommand test" -l tests -d 'Only run unit and integration tests' complete -c x.py -n "__fish_x.py_using_subcommand test" -l bless -d 'whether to automatically update stderr/stdout files' complete -c x.py -n "__fish_x.py_using_subcommand test" -l force-rerun -d 'rerun tests even if the inputs are unchanged' complete -c x.py -n "__fish_x.py_using_subcommand test" -l only-modified -d 'only run tests that result has been changed' @@ -374,8 +375,9 @@ complete -c x.py -n "__fish_x.py_using_subcommand miri" -l reproducible-artifact complete -c x.py -n "__fish_x.py_using_subcommand miri" -l set -d 'override options in bootstrap.toml' -r -f 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''}" complete -c x.py -n "__fish_x.py_using_subcommand miri" -l no-fail-fast -d 'run all tests regardless of failure' -complete -c x.py -n "__fish_x.py_using_subcommand miri" -l no-doc -d 'do not run doc tests' -complete -c x.py -n "__fish_x.py_using_subcommand miri" -l doc -d 'only run doc tests' +complete -c x.py -n "__fish_x.py_using_subcommand miri" -l all-targets -d 'Run all test targets (no doc tests)' +complete -c x.py -n "__fish_x.py_using_subcommand miri" -l doc -d 'Only run doc tests' +complete -c x.py -n "__fish_x.py_using_subcommand miri" -l tests -d 'Only run unit and integration tests' complete -c x.py -n "__fish_x.py_using_subcommand miri" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x.py -n "__fish_x.py_using_subcommand miri" -s i -l incremental -d 'use incremental compilation' 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' diff --git a/src/etc/completions/x.py.ps1 b/src/etc/completions/x.py.ps1 index cac70f722098f..5eacd5f27e5e5 100644 --- a/src/etc/completions/x.py.ps1 +++ b/src/etc/completions/x.py.ps1 @@ -376,8 +376,9 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') [CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure') - [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests') - [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests') + [CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)') + [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests') + [CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests') [CompletionResult]::new('--bless', '--bless', [CompletionResultType]::ParameterName, 'whether to automatically update stderr/stdout files') [CompletionResult]::new('--force-rerun', '--force-rerun', [CompletionResultType]::ParameterName, 'rerun tests even if the inputs are unchanged') [CompletionResult]::new('--only-modified', '--only-modified', [CompletionResultType]::ParameterName, 'only run tests that result has been changed') @@ -428,8 +429,9 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') [CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure') - [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests') - [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests') + [CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)') + [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests') + [CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation') diff --git a/src/etc/completions/x.py.sh b/src/etc/completions/x.py.sh index cff17f431d33d..dcbb785c03ffe 100644 --- a/src/etc/completions/x.py.sh +++ b/src/etc/completions/x.py.sh @@ -2145,7 +2145,7 @@ _x.py() { return 0 ;; x.py__miri) - opts="-v -i -j -h --no-fail-fast --test-args --no-doc --doc --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --all-targets --doc --tests --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3875,7 +3875,7 @@ _x.py() { return 0 ;; x.py__test) - opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --no-doc --doc --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/src/etc/completions/x.py.zsh b/src/etc/completions/x.py.zsh index 47cdaf97befcc..12a48f2b7fe84 100644 --- a/src/etc/completions/x.py.zsh +++ b/src/etc/completions/x.py.zsh @@ -376,8 +376,9 @@ _arguments "${_arguments_options[@]}" : \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ '--no-fail-fast[run all tests regardless of failure]' \ -'--no-doc[do not run doc tests]' \ -'--doc[only run doc tests]' \ +'--all-targets[Run all test targets (no doc tests)]' \ +'--doc[Only run doc tests]' \ +'--tests[Only run unit and integration tests]' \ '--bless[whether to automatically update stderr/stdout files]' \ '--force-rerun[rerun tests even if the inputs are unchanged]' \ '--only-modified[only run tests that result has been changed]' \ @@ -430,8 +431,9 @@ _arguments "${_arguments_options[@]}" : \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ '--no-fail-fast[run all tests regardless of failure]' \ -'--no-doc[do not run doc tests]' \ -'--doc[only run doc tests]' \ +'--all-targets[Run all test targets (no doc tests)]' \ +'--doc[Only run doc tests]' \ +'--tests[Only run unit and integration tests]' \ '*-v[use verbose output (-vv for very verbose)]' \ '*--verbose[use verbose output (-vv for very verbose)]' \ '-i[use incremental compilation]' \ diff --git a/src/etc/completions/x.sh b/src/etc/completions/x.sh index 700617bfeba0e..a902e6534c702 100644 --- a/src/etc/completions/x.sh +++ b/src/etc/completions/x.sh @@ -2145,7 +2145,7 @@ _x() { return 0 ;; x__miri) - opts="-v -i -j -h --no-fail-fast --test-args --no-doc --doc --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --all-targets --doc --tests --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3875,7 +3875,7 @@ _x() { return 0 ;; x__test) - opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --no-doc --doc --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/src/etc/completions/x.zsh b/src/etc/completions/x.zsh index b960be4a1b10a..7f6ad77a4a548 100644 --- a/src/etc/completions/x.zsh +++ b/src/etc/completions/x.zsh @@ -376,8 +376,9 @@ _arguments "${_arguments_options[@]}" : \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ '--no-fail-fast[run all tests regardless of failure]' \ -'--no-doc[do not run doc tests]' \ -'--doc[only run doc tests]' \ +'--all-targets[Run all test targets (no doc tests)]' \ +'--doc[Only run doc tests]' \ +'--tests[Only run unit and integration tests]' \ '--bless[whether to automatically update stderr/stdout files]' \ '--force-rerun[rerun tests even if the inputs are unchanged]' \ '--only-modified[only run tests that result has been changed]' \ @@ -430,8 +431,9 @@ _arguments "${_arguments_options[@]}" : \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ '--no-fail-fast[run all tests regardless of failure]' \ -'--no-doc[do not run doc tests]' \ -'--doc[only run doc tests]' \ +'--all-targets[Run all test targets (no doc tests)]' \ +'--doc[Only run doc tests]' \ +'--tests[Only run unit and integration tests]' \ '*-v[use verbose output (-vv for very verbose)]' \ '*--verbose[use verbose output (-vv for very verbose)]' \ '-i[use incremental compilation]' \ From c555edb70e157d016cce7e0100eb303d4936d75a Mon Sep 17 00:00:00 2001 From: Urhengulas Date: Tue, 10 Mar 2026 12:14:47 +0100 Subject: [PATCH 3/3] Add `./x test --no-doc` back and print a warning --- src/bootstrap/src/core/config/config.rs | 6 ++++++ src/bootstrap/src/core/config/flags.rs | 17 +++++++++++++++++ src/etc/completions/x.fish | 2 ++ src/etc/completions/x.ps1 | 2 ++ src/etc/completions/x.py.fish | 2 ++ src/etc/completions/x.py.ps1 | 2 ++ src/etc/completions/x.py.sh | 4 ++-- src/etc/completions/x.py.zsh | 2 ++ src/etc/completions/x.sh | 4 ++-- src/etc/completions/x.zsh | 2 ++ 10 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 17f256188e1be..2c3b5251e12f6 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -415,6 +415,12 @@ impl Config { "flags.exclude" = ?flags_exclude ); + if flags_cmd.no_doc() { + eprintln!( + "WARN: `x.py test --no-doc` is renamed to `--all-targets`. `--no-doc` will be removed in the near future. Additionally `--tests` is added which only executes unit and integration tests." + ) + } + // Set config values based on flags. let mut exec_ctx = ExecutionContext::new(flags_verbose, flags_cmd.fail_fast()); exec_ctx.set_dry_run(if flags_dry_run { DryRun::UserSelected } else { DryRun::Disabled }); diff --git a/src/bootstrap/src/core/config/flags.rs b/src/bootstrap/src/core/config/flags.rs index c86f0de7551c9..a2e5def39d07c 100644 --- a/src/bootstrap/src/core/config/flags.rs +++ b/src/bootstrap/src/core/config/flags.rs @@ -428,6 +428,11 @@ pub enum Subcommand { #[arg(long)] /// Ignore `//@ ignore-backends` directives. bypass_ignore_backends: bool, + + /// Deprecated. Use `--all-targets` or `--tests` instead. + #[arg(long)] + #[doc(hidden)] + no_doc: bool, }, /// Build and run some test suites *in Miri* Miri { @@ -447,6 +452,11 @@ pub enum Subcommand { /// Only run unit and integration tests #[arg(long)] tests: bool, + + /// Deprecated. Use `--all-targets` or `--tests` instead. + #[arg(long)] + #[doc(hidden)] + no_doc: bool, }, /// Build and run some benchmarks Bench { @@ -574,6 +584,13 @@ impl Subcommand { } } + pub fn no_doc(&self) -> bool { + match *self { + Subcommand::Test { no_doc, .. } | Subcommand::Miri { no_doc, .. } => no_doc, + _ => false, + } + } + pub fn bless(&self) -> bool { match *self { Subcommand::Test { bless, .. } => bless, diff --git a/src/etc/completions/x.fish b/src/etc/completions/x.fish index 7aa1e27efe493..427e46a32a489 100644 --- a/src/etc/completions/x.fish +++ b/src/etc/completions/x.fish @@ -338,6 +338,7 @@ complete -c x -n "__fish_x_using_subcommand test" -l only-modified -d 'only run 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 `//rustfix_missing_coverage.txt`' complete -c x -n "__fish_x_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests' complete -c x -n "__fish_x_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives' +complete -c x -n "__fish_x_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead' complete -c x -n "__fish_x_using_subcommand test" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x -n "__fish_x_using_subcommand test" -s i -l incremental -d 'use incremental compilation' complete -c x -n "__fish_x_using_subcommand test" -l include-default-paths -d 'include default paths in addition to the provided ones' @@ -378,6 +379,7 @@ complete -c x -n "__fish_x_using_subcommand miri" -l no-fail-fast -d 'run all te complete -c x -n "__fish_x_using_subcommand miri" -l all-targets -d 'Run all test targets (no doc tests)' complete -c x -n "__fish_x_using_subcommand miri" -l doc -d 'Only run doc tests' complete -c x -n "__fish_x_using_subcommand miri" -l tests -d 'Only run unit and integration tests' +complete -c x -n "__fish_x_using_subcommand miri" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead' complete -c x -n "__fish_x_using_subcommand miri" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x -n "__fish_x_using_subcommand miri" -s i -l incremental -d 'use incremental compilation' complete -c x -n "__fish_x_using_subcommand miri" -l include-default-paths -d 'include default paths in addition to the provided ones' diff --git a/src/etc/completions/x.ps1 b/src/etc/completions/x.ps1 index 3aa06ac97d482..ffaadf2470344 100644 --- a/src/etc/completions/x.ps1 +++ b/src/etc/completions/x.ps1 @@ -385,6 +385,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`') [CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests') [CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives') + [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation') @@ -432,6 +433,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)') [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests') [CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests') + [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation') diff --git a/src/etc/completions/x.py.fish b/src/etc/completions/x.py.fish index 55938ea476975..df5e7f3a6dda9 100644 --- a/src/etc/completions/x.py.fish +++ b/src/etc/completions/x.py.fish @@ -338,6 +338,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand test" -l only-modified -d 'onl 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 `//rustfix_missing_coverage.txt`' complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests' complete -c x.py -n "__fish_x.py_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives' +complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead' complete -c x.py -n "__fish_x.py_using_subcommand test" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x.py -n "__fish_x.py_using_subcommand test" -s i -l incremental -d 'use incremental compilation' 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' @@ -378,6 +379,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand miri" -l no-fail-fast -d 'run complete -c x.py -n "__fish_x.py_using_subcommand miri" -l all-targets -d 'Run all test targets (no doc tests)' complete -c x.py -n "__fish_x.py_using_subcommand miri" -l doc -d 'Only run doc tests' complete -c x.py -n "__fish_x.py_using_subcommand miri" -l tests -d 'Only run unit and integration tests' +complete -c x.py -n "__fish_x.py_using_subcommand miri" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead' complete -c x.py -n "__fish_x.py_using_subcommand miri" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x.py -n "__fish_x.py_using_subcommand miri" -s i -l incremental -d 'use incremental compilation' 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' diff --git a/src/etc/completions/x.py.ps1 b/src/etc/completions/x.py.ps1 index 5eacd5f27e5e5..644c033d455fd 100644 --- a/src/etc/completions/x.py.ps1 +++ b/src/etc/completions/x.py.ps1 @@ -385,6 +385,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`') [CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests') [CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives') + [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation') @@ -432,6 +433,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)') [CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests') [CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests') + [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation') diff --git a/src/etc/completions/x.py.sh b/src/etc/completions/x.py.sh index dcbb785c03ffe..0d3765623c2f2 100644 --- a/src/etc/completions/x.py.sh +++ b/src/etc/completions/x.py.sh @@ -2145,7 +2145,7 @@ _x.py() { return 0 ;; x.py__miri) - opts="-v -i -j -h --no-fail-fast --test-args --all-targets --doc --tests --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --all-targets --doc --tests --no-doc --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3875,7 +3875,7 @@ _x.py() { return 0 ;; x.py__test) - opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --no-doc --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/src/etc/completions/x.py.zsh b/src/etc/completions/x.py.zsh index 12a48f2b7fe84..caed118ae8459 100644 --- a/src/etc/completions/x.py.zsh +++ b/src/etc/completions/x.py.zsh @@ -385,6 +385,7 @@ _arguments "${_arguments_options[@]}" : \ '--rustfix-coverage[enable this to generate a Rustfix coverage file, which is saved in \`//rustfix_missing_coverage.txt\`]' \ '--no-capture[don'\''t capture stdout/stderr of tests]' \ '--bypass-ignore-backends[Ignore \`//@ ignore-backends\` directives]' \ +'--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \ '*-v[use verbose output (-vv for very verbose)]' \ '*--verbose[use verbose output (-vv for very verbose)]' \ '-i[use incremental compilation]' \ @@ -434,6 +435,7 @@ _arguments "${_arguments_options[@]}" : \ '--all-targets[Run all test targets (no doc tests)]' \ '--doc[Only run doc tests]' \ '--tests[Only run unit and integration tests]' \ +'--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \ '*-v[use verbose output (-vv for very verbose)]' \ '*--verbose[use verbose output (-vv for very verbose)]' \ '-i[use incremental compilation]' \ diff --git a/src/etc/completions/x.sh b/src/etc/completions/x.sh index a902e6534c702..d72258aa1b9f4 100644 --- a/src/etc/completions/x.sh +++ b/src/etc/completions/x.sh @@ -2145,7 +2145,7 @@ _x() { return 0 ;; x__miri) - opts="-v -i -j -h --no-fail-fast --test-args --all-targets --doc --tests --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --all-targets --doc --tests --no-doc --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3875,7 +3875,7 @@ _x() { return 0 ;; x__test) - opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --no-doc --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/src/etc/completions/x.zsh b/src/etc/completions/x.zsh index 7f6ad77a4a548..68aeb021b7316 100644 --- a/src/etc/completions/x.zsh +++ b/src/etc/completions/x.zsh @@ -385,6 +385,7 @@ _arguments "${_arguments_options[@]}" : \ '--rustfix-coverage[enable this to generate a Rustfix coverage file, which is saved in \`//rustfix_missing_coverage.txt\`]' \ '--no-capture[don'\''t capture stdout/stderr of tests]' \ '--bypass-ignore-backends[Ignore \`//@ ignore-backends\` directives]' \ +'--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \ '*-v[use verbose output (-vv for very verbose)]' \ '*--verbose[use verbose output (-vv for very verbose)]' \ '-i[use incremental compilation]' \ @@ -434,6 +435,7 @@ _arguments "${_arguments_options[@]}" : \ '--all-targets[Run all test targets (no doc tests)]' \ '--doc[Only run doc tests]' \ '--tests[Only run unit and integration tests]' \ +'--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \ '*-v[use verbose output (-vv for very verbose)]' \ '*--verbose[use verbose output (-vv for very verbose)]' \ '-i[use incremental compilation]' \