]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/derive.rs
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / src / tools / clippy / tests / ui / derive.rs
index b276c384c04ea83dfa79f12728fab4c79e07b269..6e0ce55f57d9349c7e353ec6438e04a96afab159 100644 (file)
@@ -86,4 +86,15 @@ fn clone(&self) -> Self {
     }
 }
 
+// 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() {}