summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/derive.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/derive.rs')
-rw-r--r--src/tools/clippy/tests/ui/derive.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/derive.rs b/src/tools/clippy/tests/ui/derive.rs
index b276c384c..6e0ce55f5 100644
--- a/src/tools/clippy/tests/ui/derive.rs
+++ b/src/tools/clippy/tests/ui/derive.rs
@@ -86,4 +86,15 @@ impl<T: Clone, U> Clone for GenericRef<'_, T, U> {
}
}
+// https://github.com/rust-lang/rust-clippy/issues/10188
+#[repr(packed)]
+#[derive(Copy)]
+struct Packed<T>(T);
+
+impl<T: Copy> Clone for Packed<T> {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+
fn main() {}