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

Document the -Z flag to the rustc book #59680

Merged
merged 3 commits into from
Apr 12, 2019

Conversation

DevQps
Copy link
Contributor

@DevQps DevQps commented Apr 3, 2019

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 #41142

@rust-highfive
Copy link
Collaborator

r? @frewsxcv

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 3, 2019
@@ -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
Copy link
Member

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?

Copy link
Contributor Author

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..)

Copy link
Member

Choose a reason for hiding this comment

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

cc @rust-lang/compiler

Copy link
Member

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.

Copy link
Contributor Author

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 :)

@cramertj
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 10, 2019

📌 Commit cdeb745 has been approved by cramertj

@bors
Copy link
Contributor

bors commented Apr 10, 2019

🌲 The tree is currently closed for pull requests below priority 15, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 10, 2019
sanxiyn added a commit to sanxiyn/rust that referenced this pull request Apr 11, 2019
…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
cramertj added a commit to cramertj/rust that referenced this pull request Apr 11, 2019
…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
Centril added a commit to Centril/rust that referenced this pull request Apr 12, 2019
…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
bors added a commit that referenced this pull request Apr 12, 2019
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
@bors bors merged commit cdeb745 into rust-lang:master Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document other kinds of unstability in The Unstable Book
6 participants