Skip to content

Commit d174cb6

Browse files
authored
Merge pull request #1041 from kupiakos/patch-1
Add missing generic in "perfect derive" paragraph
2 parents e6460a2 + 5b42f3c commit d174cb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

posts/inside-rust/2022-04-04-lang-roadmap-2024.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ to discuss, or send a private message to nikomatsakis.
176176
matching a `String` with a `"str"`.
177177
- Perfect derive: determine the precise conditions for generic type
178178
parameters based on the types of a struct fields. For instance,
179-
`#[derive(Clone)] struct MyStruct(Rc<T>)` would not require `T: Clone`,
179+
`#[derive(Clone)] struct MyStruct<T>(Rc<T>)` would not require `T: Clone`,
180180
because `Rc<T>` can be cloned without it.
181181
- Autoref, operators, and clones: Generic methods that operate on
182182
references sometimes necessitate types like `&u32`; since `u32` is

0 commit comments

Comments
 (0)