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 #89172

Closed
wants to merge 18 commits into from
Closed

Conversation

the8472
Copy link
Member

@the8472 the8472 commented Sep 22, 2021

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

michiel-de-muynck and others added 18 commits September 16, 2021 03:09
Duration's Debug formatting previously ignored the width parameter.
This commit fixes that.

Fixes issue rust-lang#88059.
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
This test required a newer version of cdb than was previously enabled in
CI thus leading to some bitrot in the test since the time it was
originally created. With the update to the `windows-latest` image last
week, we're now running this test in CI and thus uncovered the
regression.

I've updated the test and it now passes.
It turned out to cause (minor) perf regressions.
Make `Duration` respect `width` when formatting using `Debug`

When printing or writing a `std::time::Duration` using `Debug` formatting, it previously completely ignored any specified `width`. This is unlike types like integers and floats, which do pad to `width`, for both `Display` and `Debug`, though not all types consider `width` in their `Debug` output (see e.g. rust-lang#30164). Curiously, `Duration`'s `Debug` formatting *did* consider `precision`.

This PR makes `Duration` pad to `width` just like integers and floats, so that
```rust
format!("|{:8?}|", Duration::from_millis(1234))
```
returns
```
|1.234s  |
```

Before you ask "who formats `Debug` output?", note that `Duration` doesn't actually implement `Display`, so `Debug` is currently the only way to format `Duration`s. I think that's wrong, and `Duration` should get a `Display` implementation, but in the meantime there's no harm in making the `Debug` formatting respect `width` rather than ignore it.

I chose the default alignment to be left-aligned. The general rule Rust uses is: numeric types are right-aligned by default, non-numeric types left-aligned. It wasn't clear to me whether `Duration` is a numeric type or not. The fact that a formatted `Duration` can end with suffixes of variable length (`"s"`, `"ms"`, `"µs"`, etc.) made me lean towards left-alignment, but it would be trivial to change it.

Fixes issue rust-lang#88059.
Fix missing `no_global_oom_handling` cfg-gating

Cfg-gate these trait impls that are neglected.

These functions compile now because they use `box` syntax which depends on `exchange_malloc` during codegen only; as a result they compiles with cfg `no_global_oom_handling` but shouldn't.

Discovered in rust-lang#89030 because that PR makes `box` syntax depend on `exchange_malloc` lang item during MIR construction.
…nagisa

Work around invalid DWARF bugs for fat LTO

This PR applies the same workaround in rust-lang#46772 to fat LTO.

It seems to fix the bug reported in rust-lang#66118 (comment).
"Fix" an overflow in byte position math

r? `@estebank`

help! I fixed the ICE only to brick the diagnostic.

I mean, it was wrong previously (using an already expanded macro span), but it is really bad now XD
…o_test, r=ehuss

Re-enable the `src/test/debuginfo/mutex.rs` test on Windows

This test required a newer version of cdb than was previously enabled in
CI thus leading to some bitrot in the test since the time it was
originally created. With the update to the `windows-latest` image last
week, we're now running this test in CI and thus uncovered the
regression.

I've updated the test and it now passes.

r? `@ehuss`
…GuillaumeGomez

Revert the rustdoc box syntax removal

Reverts the rustdoc box syntax removal from rust-lang#87781.

It turned out to cause (minor) perf regressions.

Requested in rust-lang#87781 (comment)
…n514

Document `--show-type-layout` in the rustdoc book

I also made a few small, related changes as separate commits.

r? `@jyn514`
@rustbot rustbot added the rollup A PR which is a rollup label Sep 22, 2021
@the8472
Copy link
Member Author

the8472 commented Sep 22, 2021

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Sep 22, 2021

📌 Commit c9a066d has been approved by the8472

@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 Sep 22, 2021
@klensy
Copy link
Contributor

klensy commented Sep 22, 2021

#89134 is revert for perf regression, maybe not in rollup?

@bors
Copy link
Contributor

bors commented Sep 22, 2021

⌛ Testing commit c9a066d with merge f60f786b12477cf109f8e5a9e61485c98649af21...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@the8472
Copy link
Member Author

the8472 commented Sep 22, 2021

Ugh, good point.

@bors cancel

@bors
Copy link
Contributor

bors commented Sep 22, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 22, 2021
@the8472 the8472 closed this Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.