Skip to content

Commit aa2502f

Browse files
author
Clar Charr
committed
Add note on unit struct constructors.
1 parent 3d56889 commit aa2502f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

text/0000-non-exhaustive.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,8 @@ match it like:
437437
let Unit { .. } = unit;
438438
```
439439

440-
To users of this crate, this will act exactly as if the struct were defined as:
441-
442-
```
443-
#[non_exhaustive]
444-
pub struct Unit {}
445-
```
440+
Similarly to tuple structs, this will simply lower the visibility of the
441+
constructor to `pub(crate)` if it were marked as `pub`.
446442

447443
## Functional record updates
448444

0 commit comments

Comments
 (0)