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 7 pull requests #93795

Merged
merged 20 commits into from
Feb 9, 2022
Merged

Rollup of 7 pull requests #93795

merged 20 commits into from
Feb 9, 2022

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

cjgillot and others added 20 commits February 3, 2022 18:56
This should cover a mostly cross-platform subset of supported exit codes.
Previous efforts to ignore partially consumed values meant we were also
not considering borrows of a projection. This led to cases where we'd
miss borrowed types which MIR expected to be there, leading to ICEs.
The W3C Web Content Accessibility Guidelines specify a minimum line
spacing of 1.5 and a minimum paragraph spacing of 1.5 times the line
spacing. Our current line spacing (implemented by line-height) is 1.4,
so it's a small bump to go up to 1.5. Similarly, we have a paragraph
spacing of 0.6em. Bump that to 0.75em (which is 1.5 times the 0.5em
distance between lines).

Also, fix all the font sizes so instead of being round-ish numbers in
rem (like 1.1rem, 1.2rem), they are round numbers in pixels. Ensure each
font size is at least 2 pixels different than the nearest other font
size, so distinctions can be clearly seen. Overall the font-sizes are
mostly staying the same, being rounded up or down as appropriate.

Remove a few unused styles.

Simplify the display of the mobile-topbar location, by setting its
margins to auto rather than trying to size it exactly to the topbar.
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
Add From<u8> for ExitCode

This should cover a mostly cross-platform subset of supported exit codes.

We decided to stick with `u8` initially since its the common subset between all platforms that we support (excluding wasm which I think only works with `true` or `false`). Posix is supposed to take i32s, but in practice many unix platforms mask out all but the low 8 bits or in some cases the 8-15th bits. Windows takes a u32 instead of an i32. Bourne-compatible shells also report signals as exitcode 128 + `signal_no`, so there's some ambiguity there when returning exit codes > 127, but it is possible to disambiguate them on the other side so we decided against restricting the possible codes further than to `u8`.

## Related

- Detailed analysis of exit code support on various platforms: https://internals.rust-lang.org/t/mini-pre-rfc-redesigning-process-exitstatus/5426
- rust-lang#48711
- rust-lang#43301
- https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Termination.2FExit.20Status.20Stabilization
…eGomez

rustdoc: tweak line spacing and paragraph spacing for accessibility

The [W3C Web Content Accessibility Guidelines](https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html) specify a minimum line spacing of 1.5 and a minimum paragraph spacing of 1.5 times the line spacing. Our current line spacing (implemented by line-height) is 1.4, so it's a small bump to go up to 1.5. Similarly, we have a paragraph spacing of 0.6em. Bump that to 0.75em (which is 1.5 times the 0.5em distance between lines).

Also, fix all the font sizes so instead of being round-ish numbers in rem (like 1.1rem, 1.2rem), they are round numbers in pixels: 16px, 18px, 20px, 22px, 24px. Ensure each font size is at least 2 pixels different than the nearest other font size, so distinctions can be clearly seen. Overall the font-sizes are mostly staying the same, being rounded up or down as appropriate. This will make reasoning about consistent layout sizes much easier.

Remove a few unused styles.

Simplify the display of the mobile-topbar location, by setting its margins to auto rather than trying to size it exactly to the topbar.

Part of rust-lang#59845.

Demo: https://rustdoc.crud.net/jsha/font-sizes-spacing/std/string/struct.String.html

r? `@GuillaumeGomez`
…oshtriplett

Stabilize int_abs_diff in 1.60.0.

FCP finished here: rust-lang#89492 (comment)
Remove defaultness from ImplItem.

This information is not really used anywhere, except HIR pretty-printing. This makes ImplItem and TraitItem more similar.
rustc_query_impl: reduce visibility of some modules/fn's

Locally this reduces number of exported functions from 15221 -> 14952 and size a little.

Perf run please?
…jection, r=tmiasko

Drop tracking: track borrows of projections

Previous efforts to ignore partially consumed values meant we were also not considering borrows of a projection. This led to cases where we'd miss borrowed types which MIR expected to be there, leading to ICEs.

This PR also includes the `-Zdrop-tracking` flag from rust-lang#93313. If that PR lands first, I'll rebase to drop the commit from this one.

Fixes rust-lang#93648
update `ty::TyKind` documentation

slightly unsure about `ty::Opaque` and `ty::Bound`/`ty::Placeholder`.

r? `@jackh726` `@nikomatsakis` `@oli-obk`
@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 Feb 9, 2022
@JohnTitor
Copy link
Member Author

@bors r+ p=7 rollup=never

@bors
Copy link
Contributor

bors commented Feb 9, 2022

📌 Commit 7f4486b has been approved by JohnTitor

@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 Feb 9, 2022
@bors
Copy link
Contributor

bors commented Feb 9, 2022

⌛ Testing commit 7f4486b with merge bf242bb...

@bors
Copy link
Contributor

bors commented Feb 9, 2022

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing bf242bb to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 9, 2022
@bors bors merged commit bf242bb into rust-lang:master Feb 9, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bf242bb): 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.