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 rustfmt on nightly-rustc #86737

Merged
merged 2 commits into from
Jul 2, 2021
Merged

Document rustfmt on nightly-rustc #86737

merged 2 commits into from
Jul 2, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jun 30, 2021

  • Refactor the doc step for Rustdoc into a macro
  • Call the macro for both rustdoc and rustfmt
  • Add a recursion_limit macro to avoid overflow errors

This does not currently pass --document-private-items for rustfmt due to rust-lang/cargo#8422 (comment).

r? @Mark-Simulacrum cc @calebcartwright

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-rustfmt Area: Rustfmt A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Jun 30, 2021
@rust-highfive
Copy link
Collaborator

Some changes occurred in src/tools/rustfmt.

cc @calebcartwright

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 30, 2021
@jyn514
Copy link
Member Author

jyn514 commented Jun 30, 2021

Comment on lines -640 to -641
// Build rustdoc.
builder.ensure(tool::Rustdoc { compiler });
Copy link
Member Author

Choose a reason for hiding this comment

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

This wasn't actually necessary - rustdoc is built in the step before when Rustc is documented.

@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member

Seems reasonable to me -- r=me with CI fixed (looks like rustfmt failure).

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2021
The recursion_limit attribute avoids the following error:

```
error[E0275]: overflow evaluating the requirement `std::ptr::Unique<rustc_ast::Pat>: std::marker::Send`
  |
  = help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`rustfmt_nightly`)
```
@jyn514
Copy link
Member Author

jyn514 commented Jul 2, 2021

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Jul 2, 2021

📌 Commit 01cf0bd has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 2, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 2, 2021
…laumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#85749 (Revert "Don't load all extern crates unconditionally")
 - rust-lang#86714 (Add linked list cursor end methods)
 - rust-lang#86737 (Document rustfmt on nightly-rustc)
 - rust-lang#86776 (Skip layout query when computing integer type size during mangling)
 - rust-lang#86797 (Stabilize `Bound::cloned()`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2a122dc into rust-lang:master Jul 2, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 2, 2021
@jyn514 jyn514 deleted the doc-tools branch July 2, 2021 14:36
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 8, 2021
…items, r=jyn514

Document rustdoc with `--document-private-items`

The `tool_doc` macro introduced in rust-lang#86737 did not use `false` as the default value for `binary` when it is not provided, so the `if` is not even expanded and thus the argument is never provided if the `binary` argument isn't.

Resolves rust-lang#86900

r? `@Mark-Simulacrum`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 8, 2021
…items, r=jyn514

Document rustdoc with `--document-private-items`

The `tool_doc` macro introduced in rust-lang#86737 did not use `false` as the default value for `binary` when it is not provided, so the `if` is not even expanded and thus the argument is never provided if the `binary` argument isn't.

Resolves rust-lang#86900

r? ``@Mark-Simulacrum``
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 8, 2021
…items, r=jyn514

Document rustdoc with `--document-private-items`

The `tool_doc` macro introduced in rust-lang#86737 did not use `false` as the default value for `binary` when it is not provided, so the `if` is not even expanded and thus the argument is never provided if the `binary` argument isn't.

Resolves rust-lang#86900

r? ```@Mark-Simulacrum```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-rustfmt Area: Rustfmt S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants