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: Get rid of clean::TypeKind #84464

Merged
merged 6 commits into from
Apr 24, 2021
Merged

rustdoc: Get rid of clean::TypeKind #84464

merged 6 commits into from
Apr 24, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 23, 2021

It does exactly the same thing as ItemType.

@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
Copy link
Collaborator

r? @CraftSpider

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 23, 2021
Copy link
Contributor

@CraftSpider CraftSpider left a comment

Choose a reason for hiding this comment

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

Only question is, what's the reasoning for keeping ItemType over TypeKind? I'm guessing because TypeKind looks like it was only used as a brief stand-in for ItemType anyways. Otherwise looks good, will approve assuming tests pass.

@jyn514
Copy link
Member Author

jyn514 commented Apr 23, 2021

@CraftSpider ItemType has a custom Serialize impl that needs to match the JSON frontend:

(*self as u8).serialize(serializer)

/// The search index uses item types encoded as smaller numbers which equal to
/// discriminants. JavaScript then is used to decode them into the original value.
/// Consequently, every change to this type should be synchronized to
/// the `itemTypes` mapping table in `html/static/main.js`.
///
/// In addition, code in `html::render` uses this enum to generate CSS classes, page prefixes, and
/// module headings. If you are adding to this enum and want to ensure that the sidebar also prints
/// a heading, edit the listing in `html/render.rs`, function `sidebar_module`. This uses an
/// ordering based on a helper function inside `item_module`, in the same file.

@jyn514
Copy link
Member Author

jyn514 commented Apr 23, 2021

@bors r=CraftSpider

@bors
Copy link
Contributor

bors commented Apr 23, 2021

📌 Commit 6c066ab has been approved by CraftSpider

@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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 23, 2021
rustdoc: Get rid of `clean::TypeKind`

It does exactly the same thing as ItemType.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 23, 2021
rustdoc: Get rid of `clean::TypeKind`

It does exactly the same thing as ItemType.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 23, 2021
rustdoc: Get rid of `clean::TypeKind`

It does exactly the same thing as ItemType.
@JohnTitor
Copy link
Member

@bors r-
This PR now has a merge conflict.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 23, 2021
@bors

This comment has been minimized.

@jyn514
Copy link
Member Author

jyn514 commented Apr 23, 2021

@bors r=CraftSpider

@bors
Copy link
Contributor

bors commented Apr 23, 2021

📌 Commit d17b79147c580dc94bd9b40e14ca76ce76f9367a has been approved by CraftSpider

@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
@rust-log-analyzer

This comment has been minimized.

@jyn514
Copy link
Member Author

jyn514 commented Apr 23, 2021

@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 23, 2021
@jyn514
Copy link
Member Author

jyn514 commented Apr 23, 2021

@bors r=CraftSpider

@bors
Copy link
Contributor

bors commented Apr 23, 2021

📌 Commit ab54197 has been approved by CraftSpider

@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
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 24, 2021
rustdoc: Get rid of `clean::TypeKind`

It does exactly the same thing as ItemType.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 24, 2021
rustdoc: Get rid of `clean::TypeKind`

It does exactly the same thing as ItemType.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 24, 2021
rustdoc: Get rid of `clean::TypeKind`

It does exactly the same thing as ItemType.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 24, 2021
rustdoc: Get rid of `clean::TypeKind`

It does exactly the same thing as ItemType.
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 e25c5e2 into rust-lang:master Apr 24, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 24, 2021
@jyn514 jyn514 deleted the type-kind branch April 24, 2021 23:02
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.

7 participants