From 56daf63d10f7ade09ab0523333c65370a88c79ae Mon Sep 17 00:00:00 2001 From: Jan Riemer Date: Sun, 16 Aug 2020 22:25:59 +0200 Subject: [PATCH] docs: add `derive` for struct Code blocks in doc comments are compiled and run, so we show `Copy` works in this example. Co-authored-by: Poliorcetics --- library/core/src/marker.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 85e2e3830a51..f113f9392301 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -323,6 +323,7 @@ pub trait StructuralEq { /// ``` /// # #![allow(dead_code)] /// # struct PointList; +/// #[derive(Copy, Clone)] /// struct PointListWrapper<'a> { /// point_list_ref: &'a PointList, /// }