Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unstable --print=supported-crate-types option #138641

Merged
merged 4 commits into from
Mar 24, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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.
jieyouxu committed Mar 23, 2025
commit f2cde8eeb4378b99cb722a9ef4a2f6cc83b805e1
7 changes: 7 additions & 0 deletions tests/ui/print-request/print-lints-help.rs
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +5 to +7
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the test intention can't be accidentally blessed away as easily.

Original file line number Diff line number Diff line change
@@ -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

2 changes: 0 additions & 2 deletions tests/ui/rustc-print-info-issue-138612.rs

This file was deleted.