We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bbe675 commit 2adba31Copy full SHA for 2adba31
src/doc/book/structs.md
@@ -10,7 +10,7 @@ let origin_y = 0;
10
```
11
12
A `struct` lets us combine these two into a single, unified datatype with `x`
13
-and `y` as traits:
+and `y` as field labels:
14
15
```rust
16
struct Point {
@@ -19,7 +19,7 @@ struct Point {
19
}
20
21
fn main() {
22
- let origin = Point { x: 0, y: 0 }; // create an instance
+ let origin = Point { x: 0, y: 0 }; // origin: Point
23
24
println!("The origin is at ({}, {})", origin.x, origin.y);
25
0 commit comments