Closed
Description
Location
https://doc.rust-lang.org/rustc/command-line-arguments.html#--print-print-compiler-information
Summary
When I use rustc ---print
, it reports
Usage:
--print [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]
But some of them can not be found in the corresponding chapter in rustc book. And the order in which the parameters are arranged needs to be adjusted.
Activity
Urgau commentedon Mar 19, 2025
That's because some of them are unstable.
What do you mean by "adjusted"?
ChrisDenton commentedon Mar 19, 2025
We should probably try to hide the unstable options on stable? Although that might be more difficult to do since I don't think stable/unstable is easy to query.
xizheyin commentedon Mar 19, 2025
Alphabetical order may be more beautiful.
I think so, too, otherwise it may cause confusion.Is it possible to mark as unstable?
jieyouxu commentedon Mar 19, 2025
It should be possible to hide the unstable options on stable due to how print requests are handed: see
rust/compiler/rustc_session/src/config.rs
Lines 2035 to 2042 in a7fc463
Probably just pull out the "what is considered unstable print request" logic
rust/compiler/rustc_session/src/config.rs
Lines 2060 to 2076 in a7fc463
(There might be a bit more nuance to this, I haven't tried implementing it)
xizheyin commentedon Apr 7, 2025
jieyou, are you going to do this? If not, I can give it a try. @jieyouxu
jieyouxu commentedon Apr 7, 2025
I am not working on this, no.
Rollup merge of rust-lang#139850 - xizheyin:issue-138698, r=jieyouxu
Rollup merge of rust-lang#139850 - xizheyin:issue-138698, r=jieyouxu
Rollup merge of rust-lang#139850 - xizheyin:issue-138698, r=jieyouxu
2 remaining items