We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1cb9ba commit 3c5001fCopy full SHA for 3c5001f
src/doc/book/src/structs.md
@@ -259,9 +259,10 @@ You can define a `struct` with no members at all:
259
struct Electron {} // Use empty braces...
260
struct Proton; // ...or just a semicolon.
261
262
-// Whether you declared the struct with braces or not, do the same when creating one.
+// Use the same notation when creating an instance.
263
let x = Electron {};
264
let y = Proton;
265
+let z = Electron; // Error
266
```
267
268
Such a `struct` is called ‘unit-like’ because it resembles the empty
0 commit comments