@@ -53,7 +53,7 @@ mod as_keyword { }
53
53
/// Constants must be explicitly typed, unlike with `let` you can't ignore its type and let the
54
54
/// compiler figure it out. Any constant value can be defined in a const, which in practice happens
55
55
/// to be most things that would be reasonable to have a constant. For example, you can't have a
56
- /// File as a const.
56
+ /// File as a ` const` .
57
57
///
58
58
/// The only lifetime allowed in a constant is 'static, which is the lifetime that encompasses all
59
59
/// others in a Rust program. For example, if you wanted to define a constant string, it would look
@@ -214,8 +214,9 @@ mod let_keyword { }
214
214
/// }
215
215
/// ```
216
216
///
217
- /// Another shortcut for struct instantiation is available when you need to make a new struct that
218
- /// shares most of a previous struct's values called struct update syntax:
217
+ /// Another shortcut for struct instantiation is available, used when you need to make a new
218
+ /// struct that has the same values as most of a previous struct of the same type, called struct
219
+ /// update syntax:
219
220
///
220
221
/// ```rust
221
222
/// # struct Foo { field1: String, field2: () }
@@ -229,10 +230,9 @@ mod let_keyword { }
229
230
/// Tuple structs are instantiated in the same way as tuples themselves, except with the struct's
230
231
/// name as a prefix: `Foo(123, false, 0.1)`.
231
232
///
232
- /// Empty structs are instantiated with just their name and nothing else. `let thing =
233
+ /// Empty structs are instantiated with just their name, and don't need anything else. `let thing =
233
234
/// EmptyStruct;`
234
235
///
235
- ///
236
236
/// # Style conventions
237
237
///
238
238
/// Structs are always written in CamelCase, with few exceptions. While the trailing comma on a
@@ -245,5 +245,4 @@ mod let_keyword { }
245
245
/// [`PhantomData`]: marker/struct.PhantomData.html
246
246
/// [book]: https://doc.rust-lang.org/book/second-edition/ch05-01-defining-structs.html
247
247
/// [reference]: https://doc.rust-lang.org/reference/items/structs.html
248
-
249
248
mod struct_keyword { }
0 commit comments