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 8 pull requests #85199

Merged
merged 34 commits into from
May 12, 2021
Merged

Rollup of 8 pull requests #85199

merged 34 commits into from
May 12, 2021

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Rustin170506 and others added 30 commits May 7, 2021 10:41
All other sibling functions call this variable "slot", so "slote" was most likely a typo.
Right now it just shows the size.
Layout errors can occur with valid code, e.g. generic types.
At first you might think "why not just click through to the aliased
type?", but if a type alias instantiates all of the generic parameters
of the aliased type, then it can show layout info even though the
aliased type cannot (because we can't compute the layout of a generic
type). So I think it's still useful to show layout info for type
aliases.
This should prevent confusion about why generic types don't have layout
docs.
There are issues with computing layout for type aliases; see rust-lang#85103.
Once the issues are fixed, we should re-enable layout docs for them.
For boolean variables it's shorter and more readable to check the value
directly, or negate it with `!`.

In a couple of cases I reordered an if/else pair because it made the
initial `if` statement simpler.

Removed unused isType parameter from two functions.
…tatements, r=tmandry"

This reverts commit e5f83d2, reversing
changes made to ac888e8.
…illaumeGomez

rustdoc: Add unstable CLI option to show basic type layout information

Closes rust-lang#75988.

Right now it just shows the size.
rustdoc: remove explicit boolean comparisons.

For boolean variables it's shorter and more readable to check the value directly, or negate it with `!`.

In a couple of cases I reordered an if/else pair because it made the initial `if` statement simpler.

An example of a style guide recommending this: https://airbnb.io/javascript/#comparison--shortcuts

r? `@GuillaumeGomez`
Change param name (k to key and v to value) in std::env module

1. When I was reading code the ide displayed `k` and `v`, so I
thought it would be better to show key and value?

2. I noticed var method already uses `key` instead of `k` so it
is more consistent to use `key` instead of `k`?

Thanks
Fix typo in variable name

All other sibling functions call this variable "slot", so "slote" was most likely a typo.
Use .name_str() to format primitive types in error messages

This pull request fixes rust-lang#84976. The problem described there is caused by this code
https://github.com/rust-lang/rust/blob/506e75cbf8cb5305e49a41326307004ca3976029/compiler/rustc_middle/src/ty/error.rs#L161-L166
using `Debug` formatting (`{:?}`), while the proper solution is to call `name_str()` of `ty::IntTy`, `ty::UintTy` and `ty::FloatTy`, respectively.
…tester, r=Mark-Simulacrum

Improve rustdoc gui tester

I cherry-picked the commit from rust-lang#84834 (and modified it a bit). I also used this opportunity to update it to last version (forgot to update GUI test in rust-lang#85074, really can't wait to make rust-lang#84586 finally work).

cc `@Mark-Simulacrum` for the changes in bootstrap.

r? `@jsha`
…-statements, r=tmandry

Revert "Auto merge of rust-lang#84797 - richkadel:cover-unreachable-statements…

This reverts commit e5f83d2, reversing
changes made to ac888e8.

See rust-lang#84797 (comment)

r? `@tmandry`
@rustbot rustbot added the rollup A PR which is a rollup label May 11, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=8 rollup=never

@bors
Copy link
Contributor

bors commented May 11, 2021

📌 Commit e27f20a 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 May 11, 2021
@bors
Copy link
Contributor

bors commented May 11, 2021

⌛ Testing commit e27f20a with merge 890803d...

@bors
Copy link
Contributor

bors commented May 12, 2021

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

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.