rust/library/core
Jan Riemer a876b3d8aa
docs(marker/copy): provide example for &T being Copy
In the current documentation about the `Copy` marker trait, there is a section
with examples of structs that can implement `Copy`. Currently there is no example for
showing that shared references (`&T`) are also `Copy`.
It is worth to have a dedicated example for `&T` being `Copy`, because shared
references are an integral part of the language and it being `Copy` is not as
intuitive as other types that share this behaviour like `i32` or `bool`.

The example picks up on the previous non-`Copy` struct and shows that
structs can be `Copy`, even when they hold a shared reference to a non-`Copy` type.
2020-08-16 20:03:34 +02:00
..
benches
src docs(marker/copy): provide example for &T being Copy 2020-08-16 20:03:34 +02:00
tests add tests for array_chunks 2020-07-30 10:50:34 +02:00
Cargo.toml