docs: autogenerate compiler flag stubs based on -Zhelp#142135
Conversation
|
Failed to set assignee to
|
|
r? compiler |
This comment has been minimized.
This comment has been minimized.
42a4c2d to
2cfd494
Compare
|
r? compiler |
|
@bors r+ |
…piler-errors docs: autogenerate compiler flag stubs based on -Zhelp Adds autogenerated compiler flag stubs to the unstable book by building rustc, passing it's path to `unstable-book-gen`, and using that to call the compiler with `-Zhelp` and create a similar `Features` that is used for library and lang stubs. Example: ```md # `combine_cgu` combine CGUs into a single one This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use. ------------------------ ``` Closes rust-lang#141525
…piler-errors docs: autogenerate compiler flag stubs based on -Zhelp Adds autogenerated compiler flag stubs to the unstable book by building rustc, passing it's path to `unstable-book-gen`, and using that to call the compiler with `-Zhelp` and create a similar `Features` that is used for library and lang stubs. Example: ```md # `combine_cgu` combine CGUs into a single one This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use. ------------------------ ``` Closes rust-lang#141525
…piler-errors docs: autogenerate compiler flag stubs based on -Zhelp Adds autogenerated compiler flag stubs to the unstable book by building rustc, passing it's path to `unstable-book-gen`, and using that to call the compiler with `-Zhelp` and create a similar `Features` that is used for library and lang stubs. Example: ```md # `combine_cgu` combine CGUs into a single one This feature has no tracking issue, and is therefore likely internal to the compiler, not being intended for general use. ------------------------ ``` Closes rust-lang#141525
Rollup of 9 pull requests Successful merges: - #138016 (Added `Clone` implementation for `ChunkBy`) - #140770 (add `extern "custom"` functions) - #141162 (refactor `AttributeGate` and `rustc_attr!` to emit notes during feature checking) - #141474 (Add `ParseMode::Diagnostic` and fix multiline spans in diagnostic attribute lints) - #141947 (Specify that "option-like" enums must be `#[repr(Rust)]` to be ABI-compatible with their non-1ZST field.) - #142135 (docs: autogenerate compiler flag stubs based on -Zhelp) - #142252 (Improve clarity of `core::sync::atomic` docs about "Considerations" in regards to CAS operations) - #142337 (miri: add flag to suppress float non-determinism) - #142353 (compiler: Ease off the accelerator on `unsupported_calling_conventions`) r? `@ghost` `@rustbot` modify labels: rollup
|
@bors r- |
|
@rmehri01 |
Hey! Sorry I'm not exactly sure what went wrong here, it seems like it has to do something with getting the output of Edit: nvm I think I messed up the host argument to |
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #145210) made this pull request unmergeable. Please resolve the merge conflicts. |
0e7711e to
8e0034d
Compare
This comment has been minimized.
This comment has been minimized.
d633a45 to
91ee21b
Compare
|
☔ The latest upstream changes (presumably #145011) made this pull request unmergeable. Please resolve the merge conflicts. |
91ee21b to
3104e57
Compare
|
r? bootstrap |
|
|
||
| fn collect_compiler_flags(rustc_path: impl AsRef<Path>) -> Features { | ||
| let mut rustc = Command::new(rustc_path.as_ref()); | ||
| rustc.arg("-Zhelp"); |
There was a problem hiding this comment.
Rather than running -Zhelp and then trying to parse that, maybe we can parse the options! macro (
rust/compiler/rustc_session/src/options.rs
Line 2116 in 040a98a
I'm OK with sticking with -Z/-C parsing since the syntax is both fairly simple and controlled by us, though.
We'd likely also want (perhaps in a separate PR) to enforce that all the -C flags in codegen options (also in the linked file) have documentation in the non-unstable book. That could be done in tidy.
There was a problem hiding this comment.
It would probably be nice to have the file/line to link to, do you mean just literally reading and parsing the rust source file to do that or is there a better way to go about it?
3104e57 to
41eb772
Compare
|
☔ The latest upstream changes (presumably #146592) made this pull request unmergeable. Please resolve the merge conflicts. |
…by789 Autogenerate unstable compiler flag stubs for unstable-book Closes rust-lang#141525. Based on old PR rust-lang#142135. Parses `rustc -Zhelp` to generate doc stubs for unstable compiler flags if any are missing.
…by789 Autogenerate unstable compiler flag stubs for unstable-book Closes rust-lang#141525. Based on old PR rust-lang#142135. Parses `rustc -Zhelp` to generate doc stubs for unstable compiler flags if any are missing.
…by789 Autogenerate unstable compiler flag stubs for unstable-book Closes rust-lang#141525. Based on old PR rust-lang#142135. Parses `rustc -Zhelp` to generate doc stubs for unstable compiler flags if any are missing.
…by789 Autogenerate unstable compiler flag stubs for unstable-book Closes rust-lang#141525. Based on old PR rust-lang#142135. Parses `rustc -Zhelp` to generate doc stubs for unstable compiler flags if any are missing.
…by789 Autogenerate unstable compiler flag stubs for unstable-book Closes rust-lang#141525. Based on old PR rust-lang#142135. Parses `rustc -Zhelp` to generate doc stubs for unstable compiler flags if any are missing.
…by789 Autogenerate unstable compiler flag stubs for unstable-book Closes rust-lang#141525. Based on old PR rust-lang#142135. Parses `rustc -Zhelp` to generate doc stubs for unstable compiler flags if any are missing.
…by789 Autogenerate unstable compiler flag stubs for unstable-book Closes rust-lang#141525. Based on old PR rust-lang#142135. Parses `rustc -Zhelp` to generate doc stubs for unstable compiler flags if any are missing.
Adds autogenerated compiler flag stubs to the unstable book by building rustc, passing it's path to
unstable-book-gen, and using that to call the compiler with-Zhelpand create a similarFeaturesthat is used for library and lang stubs.Example:
Closes #141525