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

Rollup of 5 pull requests #93482

Merged
merged 18 commits into from
Jan 30, 2022
Merged

Rollup of 5 pull requests #93482

merged 18 commits into from
Jan 30, 2022

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jan 30, 2022

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dtolnay and others added 18 commits January 18, 2022 11:04
- Make sure the mobile-topbar doesn't overflow its height if the user
  sets a bigger font.

- Make sure the sidebar can be scrolled all the way to the bottom by
  shortening it to accommodate the mobile-topbar.

- Make the item name in the mobile-topbar clickable to go to the top of
  the page.

- Remove excess padding sidebar in mobile mode.
…=Mark-Simulacrum

Bootstrap compiler update

r? ``@Mark-Simulacrum``
Render more readable macro matcher tokens in rustdoc

Follow-up to rust-lang#92334.

This PR lifts some of the token rendering logic from https://github.com/dtolnay/prettyplease into rustdoc so that even the matchers for which a source code snippet is not available (because they are macro-generated, or any other reason) follow some baseline good assumptions about where the tokens in the macro matcher are appropriate to space.

The below screenshots show an example of the difference using one of the gnarliest macros I could find. Some things to notice:

- In the **before**, notice how a couple places break in between `$(....)`↵`*`, which is just about the worst possible place that it could break.

- In the **before**, the lines that wrapped are weirdly indented by 1 space of indentation relative to column 0. In the **after**, we use the typical way of block indenting in Rust syntax which is put the open/close delimiters on their own line and indent their contents by 4 spaces relative to the previous line (so 8 spaces relative to column 0, because the matcher itself is indented by 4 relative to the `macro_rules` header).

- In the **after**, macro_rules metavariables like `$tokens:tt` are kept together, which is how just about everybody writing Rust today writes them.

## Before

![Screenshot from 2022-01-14 13-05-53](https://user-images.githubusercontent.com/1940490/149585105-1f182b78-751f-421f-a234-9dbc04fa3bbd.png)

## After

![Screenshot from 2022-01-14 13-06-04](https://user-images.githubusercontent.com/1940490/149585118-d4b52ea7-3e67-4b6e-a12b-31dfb8172f86.png)

r? `@camelid`
…omez

rustdoc: mobile nav fixes

- Make sure the mobile-topbar doesn't overflow its height if the user sets a bigger font.

- Make sure the sidebar can be scrolled all the way to the bottom by shortening it to accommodate the mobile-topbar.

- Make the item name in the mobile-topbar clickable to go to the top of the page.

- Remove excess padding sidebar in mobile mode.

Demo https://rustdoc.crud.net/jsha/mobile-nav-fixes/std/string/struct.String.html

r? `@GuillaumeGomez`
…jsha

Add test to ensure that theme is applied correctly when going back in history

Fixes rust-lang#93258.

r? `@jsha`
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 30, 2022
@ehuss
Copy link
Contributor Author

ehuss commented Jan 30, 2022

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 30, 2022

📌 Commit 5e48378 has been approved by ehuss

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 30, 2022
@bors
Copy link
Contributor

bors commented Jan 30, 2022

⌛ Testing commit 5e48378 with merge 8c7f2bf...

@bors
Copy link
Contributor

bors commented Jan 30, 2022

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 8c7f2bf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 30, 2022
@bors bors merged commit 8c7f2bf into rust-lang:master Jan 30, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 30, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8c7f2bf): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

9 participants