diff options
| author | Jieyou Xu <jieyouxu@outlook.com> | 2025-03-21 14:52:26 +0800 |
|---|---|---|
| committer | Jieyou Xu <jieyouxu@outlook.com> | 2025-03-23 19:08:56 +0800 |
| commit | f2cde8eeb4378b99cb722a9ef4a2f6cc83b805e1 (patch) | |
| tree | 97b8408a266111443c0ea996baa413fab127a7c6 | |
| parent | f1b8d896597534af16e3c1e540c336b9b444af0a (diff) | |
| download | rust-f2cde8eeb4378b99cb722a9ef4a2f6cc83b805e1.tar.gz rust-f2cde8eeb4378b99cb722a9ef4a2f6cc83b805e1.zip | |
Adjust `rustc-print-info-issue-138612.rs`
- Document test intent to check for `-Whelp` suggestion if `--print=lints` was specified. - Move this test under `tests/ui/print-request/` and rename it to `print-lints-help.rs` to better reflect what it is checking.
| -rw-r--r-- | tests/ui/print-request/print-lints-help.rs | 7 | ||||
| -rw-r--r-- | tests/ui/print-request/print-lints-help.stderr (renamed from tests/ui/rustc-print-info-issue-138612.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/rustc-print-info-issue-138612.rs | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/tests/ui/print-request/print-lints-help.rs b/tests/ui/print-request/print-lints-help.rs new file mode 100644 index 00000000000..420eae27ed4 --- /dev/null +++ b/tests/ui/print-request/print-lints-help.rs @@ -0,0 +1,7 @@ +//! Check that we point to `-Whelp` to guide the user to find the list of lints if the user requests +//! `--print=lints` (which is not a valid print request). + +//@ compile-flags: --print lints +//@ error-pattern: error: unknown print request: `lints` +//@ error-pattern: help: use `-Whelp` to print a list of lints +//@ error-pattern: help: for more information, see the rustc book diff --git a/tests/ui/rustc-print-info-issue-138612.stderr b/tests/ui/print-request/print-lints-help.stderr index 4f7ed821952..0530d11f2e8 100644 --- a/tests/ui/rustc-print-info-issue-138612.stderr +++ b/tests/ui/print-request/print-lints-help.stderr @@ -1,6 +1,6 @@ error: unknown print request: `lints` | - = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `host-tuple`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models` + = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `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` = help: use `-Whelp` to print a list of lints = help: for more information, see the rustc book: https://doc.rust-lang.org/rustc/command-line-arguments.html#--print-print-compiler-information diff --git a/tests/ui/rustc-print-info-issue-138612.rs b/tests/ui/rustc-print-info-issue-138612.rs deleted file mode 100644 index 65b595635b1..00000000000 --- a/tests/ui/rustc-print-info-issue-138612.rs +++ /dev/null @@ -1,2 +0,0 @@ -//@ check-fail -//@ compile-flags: /dev/null --print lints |
