Skip to content

Format Struct { .. } on one line even with {:#?}. - #84390

Merged
bors merged 1 commit into
rust-lang:masterfrom
m-ou-se:make-debug-non-exhaustive-without-fields-a-little-bit-less-verbose
Apr 22, 2021
Merged

Format Struct { .. } on one line even with {:#?}.#84390
bors merged 1 commit into
rust-lang:masterfrom
m-ou-se:make-debug-non-exhaustive-without-fields-a-little-bit-less-verbose

Conversation

@m-ou-se

Copy link
Copy Markdown
Member

The result of debug_struct("A").finish_non_exhaustive() before this change:

A {
..
}

And after this change:

A { .. }

If there's any fields, the result stays unchanged:

A {
field: value,
..
}

@m-ou-sem-ou-se added the T-libs-api [DEPRECATED; DO NOT USE] label Apr 21, 2021
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @kennytm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 21, 2021
@kennytm

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Apr 21, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 82dc73b has been approved by kennytm

@bors

bors commented Apr 21, 2021

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@borsbors 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 Apr 21, 2021
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Apr 21, 2021
…ithout-fields-a-little-bit-less-verbose, r=kennytm
Format `Struct { .. }` on one line even with `{:#?}`.
The result of `debug_struct("A").finish_non_exhaustive()` before this change:
```
A {
..
}
```
And after this change:
```
A { .. }
```
If there's any fields, the result stays unchanged:
```
A {
field: value,
..
}
@m-ou-sem-ou-se mentioned this pull request Apr 21, 2021
@m-ou-sem-ou-se mentioned this pull request Apr 21, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2021
Rollup of 12 pull requests
Successful merges:
- rust-lang#84013 (Replace all `fmt.pad` with `debug_struct`)
- rust-lang#84119 (Move `sys::vxworks` code to `sys::unix`)
- rust-lang#84212 (Replace `Void` in `sys` with never type)
- rust-lang#84251 (fix 'const-stable since' for NonZeroU*::new_unchecked)
- rust-lang#84301 (Document that `index` and `index_mut` can panic)
- rust-lang#84365 (Improve the docstrings of the `Lto` struct.)
- rust-lang#84378 (Fix broken doc link)
- rust-lang#84379 (Add GAT related tests)
- rust-lang#84380 (Write Rustdoc titles like "x in crate::mod - Rust")
- rust-lang#84390 (Format `Struct { .. }` on one line even with `{:#?}`.)
- rust-lang#84393 (Support `x.py doc std --open`)
- rust-lang#84406 (Remove `delete` alias from `mem::drop`.)
Failed merges:
- rust-lang#84387 (Move `sys_common::poison` to `sync::poison`)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 49a5c80 into rust-lang:masterApr 22, 2021
@rustbotrustbot added this to the 1.53.0 milestone Apr 22, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libs-api[DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@m-ou-se@rust-highfive@kennytm@bors@rustbot