mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-03 18:43:38 +00:00
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 <poliorcetics@users.noreply.github.com>
This commit is contained in:
parent
9061da2e14
commit
56daf63d10
@ -323,6 +323,7 @@ pub trait StructuralEq {
|
||||
/// ```
|
||||
/// # #![allow(dead_code)]
|
||||
/// # struct PointList;
|
||||
/// #[derive(Copy, Clone)]
|
||||
/// struct PointListWrapper<'a> {
|
||||
/// point_list_ref: &'a PointList,
|
||||
/// }
|
||||
|
Loading…
Reference in New Issue
Block a user