Update marker.rs

This commit is contained in:
Godfrey Chan 2024-09-03 12:18:46 -07:00 committed by GitHub
parent 3626b66af0
commit efc20deb57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -292,9 +292,10 @@ marker_impls! {
/// bound on type parameters:
///
/// ```
/// #[derive(Clone)]
/// struct MyStruct<T>;
///
/// impl<T: Copy> Copy for MyStruct<T> { }
/// impl<T: Copy> Copy for MyStruct<T> { }
/// ```
///
/// This isn't always desired. For example, shared references (`&T`) can be copied regardless of