about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-14 21:55:39 +0200
committerGitHub <noreply@github.com>2025-04-14 21:55:39 +0200
commit7dc3feccddb02c1f0331c56320db138f78d85be1 (patch)
tree0150ab30fd62c029f7bf1577d4deee730090a79a /tests
parent1bceed826e9a8452716cb8aaa78b98f2aa669dfc (diff)
parent1b46969a11b2cfa000593b225af94a9d3bfbedfc (diff)
Rollup merge of #139799 - clubby789:print=file, r=jieyouxu
Specify `--print info=file` syntax in `--help`

Closes #139794

I moved the listing of information that can be printed to the help string as it's getting rather long and it makes the `[=FILE]` part easier to see
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/rustc-help/help-v.diff2
-rw-r--r--tests/run-make/rustc-help/help-v.stdout6
-rw-r--r--tests/run-make/rustc-help/help.stdout6
-rw-r--r--tests/ui/invalid-compile-flags/print-without-arg.stderr5
4 files changed, 12 insertions, 7 deletions
diff --git a/tests/run-make/rustc-help/help-v.diff b/tests/run-make/rustc-help/help-v.diff
index 22c5dd81bdb..30703f6424e 100644
--- a/tests/run-make/rustc-help/help-v.diff
+++ b/tests/run-make/rustc-help/help-v.diff
@@ -1,4 +1,4 @@
-@@ -51,10 +51,27 @@
+@@ -53,10 +53,27 @@
                          Set a codegen option
      -V, --version       Print version info and exit
      -v, --verbose       Use verbose output
diff --git a/tests/run-make/rustc-help/help-v.stdout b/tests/run-make/rustc-help/help-v.stdout
index f19ca1e9f90..13af6e21060 100644
--- a/tests/run-make/rustc-help/help-v.stdout
+++ b/tests/run-make/rustc-help/help-v.stdout
@@ -29,8 +29,10 @@ Options:
         --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
                         Comma separated list of types of output for the
                         compiler to emit
-        --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
-                        Compiler information to print on stdout
+        --print INFO[=FILE]
+                        Compiler information to print on stdout (or to a file)
+                        INFO may be one of
+                        (all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).
     -g                  Equivalent to -C debuginfo=2
     -O                  Equivalent to -C opt-level=3
     -o FILENAME         Write output to <filename>
diff --git a/tests/run-make/rustc-help/help.stdout b/tests/run-make/rustc-help/help.stdout
index f7d35296603..62757d989eb 100644
--- a/tests/run-make/rustc-help/help.stdout
+++ b/tests/run-make/rustc-help/help.stdout
@@ -29,8 +29,10 @@ Options:
         --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
                         Comma separated list of types of output for the
                         compiler to emit
-        --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
-                        Compiler information to print on stdout
+        --print INFO[=FILE]
+                        Compiler information to print on stdout (or to a file)
+                        INFO may be one of
+                        (all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).
     -g                  Equivalent to -C debuginfo=2
     -O                  Equivalent to -C opt-level=3
     -o FILENAME         Write output to <filename>
diff --git a/tests/ui/invalid-compile-flags/print-without-arg.stderr b/tests/ui/invalid-compile-flags/print-without-arg.stderr
index 8abaee5056b..fd2a36e761b 100644
--- a/tests/ui/invalid-compile-flags/print-without-arg.stderr
+++ b/tests/ui/invalid-compile-flags/print-without-arg.stderr
@@ -1,5 +1,6 @@
 error: Argument to option 'print' missing
        Usage:
-           --print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
-                               Compiler information to print on stdout
+           --print INFO[=FILE] Compiler information to print on stdout (or to a file)
+                               INFO may be one of
+                               (all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).