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 redundant item kind class from .item-decl > pre #106869

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

notriddle
Copy link
Contributor

This class originated in the very first commit of rustdoc_ng, and was used to add a color border around the item decl based on its kind.

.trait { border-color: #fcae2b !important; }
.mod { border-color: #809fc7 !important; }
.enum { border-color: #93bc99 !important; }
.struct { border-color: #e53700 !important; }
.fn { border-color: #a2777f !important; }

The item decl no longer has a border, and there aren't any kind-specific styles in modern rustdoc's rendering of this UI item.

Most of this PR is updating test cases so that they use item-decl to find the <pre> tag instead of relying on the fact that the class name had rust {kind} in it while other <pre> tags only had class rust.

This class originated in the very first commit of `rustdoc_ng`, and was used
to add a color border around the item decl based on its kind.

https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L102-L106

The item decl no longer has a border, and there aren't any
kind-specific styles in modern rustdoc's rendering of this UI item.

Most of this commit is updating test cases so that they use `item-decl` to
find the `<pre>` tag instead of relying on the fact that the class name
had `rust {kind}` in it while other `<pre>` tags only had class `rust`.
@rustbot
Copy link
Collaborator

rustbot commented Jan 14, 2023

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 14, 2023
@notriddle notriddle assigned GuillaumeGomez and unassigned jsha Jan 16, 2023
@GuillaumeGomez
Copy link
Member

That's quite the archeologic discover. 😆

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 16, 2023

📌 Commit 3a3f70c has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Jan 16, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 17, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#106591 (suggestion for attempted integer identifier in patterns)
 - rust-lang#106712 (make error emitted on `impl &Trait` nicer)
 - rust-lang#106829 (Unify `Opaque`/`Projection` handling in region outlives code)
 - rust-lang#106869 (rustdoc: remove redundant item kind class from `.item-decl > pre`)
 - rust-lang#106949 (ConstBlocks are poly if their substs are poly)
 - rust-lang#106953 (Document `EarlyBinder::subst_identity` and `skip_binder`)
 - rust-lang#106958 (Don't add A-bootstrap to PRs modifying Cargo.lock)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b90f629 into rust-lang:master Jan 17, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 17, 2023
@notriddle notriddle deleted the notriddle/item-decl-pre-rust branch January 17, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants