Document rustc_macros on nightly-rustc#80362
Conversation
| // This is the intended out directory for compiler documentation. | ||
| let out = builder.compiler_doc_out(target); | ||
| t!(fs::create_dir_all(&out)); | ||
|
|
||
| let compiler = builder.compiler(stage, builder.config.build); | ||
|
|
||
| if !builder.config.compiler_docs { | ||
| builder.info("\tskipping - compiler/librustdoc docs disabled"); | ||
| return; | ||
| } | ||
|
|
||
| // This is the intended out directory for compiler documentation. | ||
| let out = builder.compiler_doc_out(target); | ||
| t!(fs::create_dir_all(&out)); | ||
|
|
||
| // Build rustc. | ||
| let compiler = builder.compiler(stage, builder.config.build); |
There was a problem hiding this comment.
It looks like this was just moved since it's not needed when compiler-docs is off?
There was a problem hiding this comment.
Right, this is just cleanup. I think builder.compiler() won't do any extra work because you'd need it anyway for other docs, but I'm not 100% sure about that.
|
It is a bit of an unfortunate hack, but I think it should be fine considering it is already doing symlink shenanigans. If it is a problem in the future it can always be adjusted. I don't think rearranging the check for I'm not sure how valuable this is, since the proc-macros don't actually have any documentation. But despite the above, I don't think this should cause too many problems, and seems to work as expected. @bors r+ rollup |
|
📌 Commit 82acbc8 has been approved by |
I often use the API docs to look up a path so that I can see the type signatures and find where it's defined in the source code, so it will be helpful to me at least :) Plus, hopefully we'll document the proc macros at some point. |
Document rustc_macros on nightly-rustc Fixes rust-lang#80345.   r? `@ehuss`
Rollup of 11 pull requests Successful merges: - rust-lang#79662 (Move some more code out of CodegenBackend::{codegen_crate,link}) - rust-lang#79815 (Update RELEASES.md for 1.49.0) - rust-lang#80284 (Suggest fn ptr rather than fn item and suggest to use `Fn` trait bounds rather than the unique closure type in E0121) - rust-lang#80331 (Add more comments to trait queries) - rust-lang#80344 (use matches!() macro in more places) - rust-lang#80353 (BTreeMap: test split_off (and append) more thoroughly) - rust-lang#80362 (Document rustc_macros on nightly-rustc) - rust-lang#80399 (Remove FIXME in rustc_privacy) - rust-lang#80408 (Sync rustc_codegen_cranelift) - rust-lang#80411 (rustc_span: Remove `Symbol::with`) - rust-lang#80434 (bootstrap: put the component name in the tarball temp dir path) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #80345.
r? @ehuss