diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-09-08 08:23:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-08 08:23:02 +0200 |
| commit | 403a18f13dd8f009c3ca31cea56d0c9dfea3c4d5 (patch) | |
| tree | ba94dd46097ba682fe49df91e9abc38caaa60fcc /compiler/rustc_mir_transform/src/coverage/debug.rs | |
| parent | 6b00cfbde7cdbd749e2ab8adb9aab2a17ecd99a7 (diff) | |
| parent | c4bb70f51b545d87a29bfb68898e5f4169345f8e (diff) | |
| download | rust-403a18f13dd8f009c3ca31cea56d0c9dfea3c4d5.tar.gz rust-403a18f13dd8f009c3ca31cea56d0c9dfea3c4d5.zip | |
Rollup merge of #115604 - GuillaumeGomez:private-fields-tuple-struct, r=notriddle
rustdoc: Render private fields in tuple struct as `/* private fields */`
Reopening of https://github.com/rust-lang/rust/pull/110552. All that was missing was a test for the different cases so I added it into the second commit.
Description from the original PR:
> I've gotten some feedback that the current rustdoc rendering of...
>
> ```
> struct HasPrivateFields(_);
> ```
>
> ...is confusing, and I agree with that feedback, especially compared to the field struct case:
>
> ```
> struct HasPrivateFields { /* private fields */ }
> ```
>
> So this PR makes it so that when all of the fields of a tuple variant are private, just render it with the `/* private fields */` comment. We can't *always* render it like that, for example when there's a mix of private and public fields.
cc ````@jsha````
r? ````@notriddle````
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions
