-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Document the -Z flag to the rustc book #59680
Conversation
…n in the rustc book.
r? @frewsxcv (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -86,6 +86,12 @@ This flag will set which lints should be set to the [deny level](lints/levels.ht | |||
|
|||
This flag will set which lints should be set to the [forbid level](lints/levels.html#forbid). | |||
|
|||
## `-Z`: set options for debugging rustc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, while it's true that many flags are good for debugging, that's not the purpose of -Z
. It's really for unstable compiler flags. It just so happens that debugging is a good use of flags that aren't yet stable.
Could we maybe re-word this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh glad you say so! I came to that conclusion by running rustc --help
which says:
-Z help Print internal options for debugging rustc
Maybe this should be changed as well then? What do you think about:
-Z help Print unstable compiler flags
When running rustc -Z help
it also starts with:
Available debug options:
...
Should this be changed into something more generic like "Available options:" as well?
Curious to what you think of all this! Because of these lines I was really under the impression it was for debug options only (even though that seemed a bit weird to me..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @rust-lang/compiler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 -- these aren't just for debugging, changing the description would make sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steveklabnik @cramertj I updated the descriptions (Y).
I saw that some methods also contained words like "debug_..." but I wasn't brave enough to go and change those as well :)
…ble compiler flags, instead of flags for debugging.
@bors r+ rollup |
📌 Commit cdeb745 has been approved by |
🌲 The tree is currently closed for pull requests below priority 15, this pull request will be tested once the tree is reopened |
…mertj Document the -Z flag to the rustc book # Description Changes: - Added new documentation on the `-Z` flag of rustc in the command-line arguments section of the rustc book. If I need to rephrase anything or if you have any improvements, please let me know! I deliberately did not create an exhaustive list of all options since they are likely to change over time and per toolchain version. closes rust-lang#41142
…mertj Document the -Z flag to the rustc book # Description Changes: - Added new documentation on the `-Z` flag of rustc in the command-line arguments section of the rustc book. If I need to rephrase anything or if you have any improvements, please let me know! I deliberately did not create an exhaustive list of all options since they are likely to change over time and per toolchain version. closes rust-lang#41142
…mertj Document the -Z flag to the rustc book # Description Changes: - Added new documentation on the `-Z` flag of rustc in the command-line arguments section of the rustc book. If I need to rephrase anything or if you have any improvements, please let me know! I deliberately did not create an exhaustive list of all options since they are likely to change over time and per toolchain version. closes rust-lang#41142
Rollup of 15 pull requests Successful merges: - #59680 (Document the -Z flag to the rustc book) - #59711 (Add back the substring test) - #59806 (compiletest: Improve no_prefer_dynamic docs) - #59809 (Make trait_methods_not_found use a lock) - #59811 (Kill dead code dominator code.) - #59814 (Fix broken links on std::boxed doc page) - #59821 (improve unknown enum variant errors) - #59831 (Remove strange formatting in `Ordering` docs.) - #59836 (std::ops::Div examples: correct nominator to numerator) - #59857 (SGX target: fix cfg(test) build) - #59876 (Update TRPL to use mdbook 0.2) - #59880 (Remove note about transmute for float bitpatterns.) - #59889 (Update diagnostics.rs) - #59891 (Fix the link to sort_by_cached_key) - #59894 (save-analysis: Pull associated type definition using `qpath_def`) Failed merges: r? @ghost
Description
Changes:
-Z
flag of rustc in the command-line arguments section of the rustc book.If I need to rephrase anything or if you have any improvements, please let me know! I deliberately did not create an exhaustive list of all options since they are likely to change over time and per toolchain version.
closes #41142