From 5b42f3c3886005f5090829019850dbc7df344c80 Mon Sep 17 00:00:00 2001 From: Alyssa Haroldsen Date: Fri, 21 Oct 2022 11:50:14 -0700 Subject: [PATCH] Add missing generic in "perfect derive" paragraph https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9662ba9557d61e0507477e386a81e260 --- posts/inside-rust/2022-04-04-lang-roadmap-2024.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/inside-rust/2022-04-04-lang-roadmap-2024.md b/posts/inside-rust/2022-04-04-lang-roadmap-2024.md index 1517cfedb..b915fe5ce 100644 --- a/posts/inside-rust/2022-04-04-lang-roadmap-2024.md +++ b/posts/inside-rust/2022-04-04-lang-roadmap-2024.md @@ -176,7 +176,7 @@ to discuss, or send a private message to nikomatsakis. matching a `String` with a `"str"`. - Perfect derive: determine the precise conditions for generic type parameters based on the types of a struct fields. For instance, - `#[derive(Clone)] struct MyStruct(Rc)` would not require `T: Clone`, + `#[derive(Clone)] struct MyStruct(Rc)` would not require `T: Clone`, because `Rc` can be cloned without it. - Autoref, operators, and clones: Generic methods that operate on references sometimes necessitate types like `&u32`; since `u32` is