-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Clarify -Z help output and note rustc flags #17150
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
base: master
Are you sure you want to change the base?
Changes from all commits
96b4462
c22b76a
f045712
a42cb84
7a6742f
aa20e1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,26 +125,32 @@ fn print_zhelp(gctx: &GlobalContext) { | |
| drop_println!( | ||
| gctx, | ||
| "\ | ||
| {header}Available unstable (nightly-only) flags:{header:#} | ||
| {header}Available unstable (nightly-only) cargo flags:{header:#} | ||
|
|
||
| {z_flags} | ||
|
|
||
| Run with `{literal}cargo -Z{literal:#} {placeholder}[FLAG] [COMMAND]{placeholder:#}`", | ||
| ); | ||
| if !gctx.nightly_features_allowed { | ||
| drop_println!( | ||
| gctx, | ||
| "\nUnstable flags are only available on the nightly channel \ | ||
| of Cargo, but this is the `{}` channel.\n\ | ||
| {}", | ||
| features::channel(), | ||
| features::SEE_CHANNELS | ||
| let _ = gctx.shell().print_report( | ||
| &[Level::WARNING | ||
| .secondary_title(format!( | ||
| "unstable flags are unavailable on the current (`{}`) channel", | ||
| features::channel() | ||
| )) | ||
| .element(Level::HELP.message("run on the nightly channel to use them")) | ||
| .element(Level::HELP.message(format!( | ||
| "see {} for more information about Rust release channels", | ||
| features::SEE_CHANNELS | ||
| )))], | ||
| false, | ||
| ); | ||
| } | ||
| drop_println!( | ||
| gctx, | ||
| "\nSee https://doc.rust-lang.org/nightly/cargo/reference/unstable.html \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At least at #17145 (comment), I was suggesting moving the "See" above the use of annotate-snippets. Is there a reason it was kept here? |
||
| for more information about these flags." | ||
| for more information about these flags.\n\n\ | ||
| note: to see rustc unstable features, run `rustc -Zhelp`" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would expect this |
||
| ); | ||
| } | ||
|
|
||
|
|
||
|
epage marked this conversation as resolved.
|
Uh oh!
There was an error while loading. Please reload this page.
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.
While we prefer small commits, what is more important is for the commits to be atomic, reflecting how the code should be reviewed and merged and not how it was developed.
If you decide to go for multiple commits, that could look like
View changes since the review