about summary refs log tree commit diff
path: root/tests/coverage/overflow.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-08 08:23:02 +0200
committerGitHub <noreply@github.com>2023-09-08 08:23:02 +0200
commit403a18f13dd8f009c3ca31cea56d0c9dfea3c4d5 (patch)
treeba94dd46097ba682fe49df91e9abc38caaa60fcc /tests/coverage/overflow.rs
parent6b00cfbde7cdbd749e2ab8adb9aab2a17ecd99a7 (diff)
parentc4bb70f51b545d87a29bfb68898e5f4169345f8e (diff)
downloadrust-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 'tests/coverage/overflow.rs')
0 files changed, 0 insertions, 0 deletions