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

rustdoc: Remove unnecessary is_crate field from doctree::Module and clean::Module #84460

Merged
merged 1 commit into from
Apr 24, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 23, 2021

It can be calculated on-demand even without a TyCtxt.

This also changed json::conversions::from_item_kind to take a whole item, which avoids
having to add more and more parameters.

Helps with #76382.

r? @camelid

@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 23, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 23, 2021
@bors

This comment has been minimized.

src/librustdoc/clean/types.rs Show resolved Hide resolved
src/librustdoc/visit_ast.rs Show resolved Hide resolved
… clean::Module

It can be calculated on-demand even without a TyCtxt.

This also changed `from_item_kind` to take a whole item, which avoids
having to add more and more parameters.
Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

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

One nit, r=me after that.

src/librustdoc/json/conversions.rs Show resolved Hide resolved
@camelid camelid 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 Apr 23, 2021
@jyn514
Copy link
Member Author

jyn514 commented Apr 23, 2021

@bors r=camelid

@bors
Copy link
Contributor

bors commented Apr 23, 2021

📌 Commit e29f46c has been approved by camelid

@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 Apr 23, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 24, 2021
rustdoc: Remove unnecessary dummy span

Follow-up to rust-lang#84460 (comment).

r? `@camelid`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 24, 2021
rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module

It can be calculated on-demand even without a TyCtxt.

This also changed `json::conversions::from_item_kind` to take a whole item, which avoids
having to add more and more parameters.

Helps with rust-lang#76382.

r? `@camelid`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 24, 2021
rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module

It can be calculated on-demand even without a TyCtxt.

This also changed `json::conversions::from_item_kind` to take a whole item, which avoids
having to add more and more parameters.

Helps with rust-lang#76382.

r? ``@camelid``
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 24, 2021
rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module

It can be calculated on-demand even without a TyCtxt.

This also changed `json::conversions::from_item_kind` to take a whole item, which avoids
having to add more and more parameters.

Helps with rust-lang#76382.

r? ```@camelid```
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 24, 2021
rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module

It can be calculated on-demand even without a TyCtxt.

This also changed `json::conversions::from_item_kind` to take a whole item, which avoids
having to add more and more parameters.

Helps with rust-lang#76382.

r? ``@camelid``
This was referenced Apr 24, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 24, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#83519 (Implement a lint that highlights all moves larger than a configured limit)
 - rust-lang#84105 (stabilize `core::array::{from_ref,from_mut}` in `1.53.0`)
 - rust-lang#84179 (Explicitly implement `!Send` and `!Sync` for `sys::{Args, Env}`)
 - rust-lang#84427 (Update Clippy)
 - rust-lang#84459 (rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()`)
 - rust-lang#84460 (rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module)
 - rust-lang#84464 (rustdoc: Get rid of `clean::TypeKind`)
 - rust-lang#84518 (Clean up DOM strings)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b566d0a into rust-lang:master Apr 24, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 24, 2021
@jyn514 jyn514 deleted the doctree-is-crate branch April 24, 2021 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants