Skip to content

Commit fdb0a39

Browse files
authored
Add note about struct field defaults (#2666)
1 parent df57606 commit fdb0a39

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/user-defined-types/named-structs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Key Points:
5353
not important.
5454
- If you already have variables with the right names, then you can create the
5555
struct using a shorthand.
56+
- Struct fields do not support default values. Default values are specified by
57+
implementing the `Default` trait which we will cover later.
5658

5759
## More to Explore
5860

0 commit comments

Comments
 (0)