summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs')
-rw-r--r--tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs
new file mode 100644
index 000000000..52163bddd
--- /dev/null
+++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs
@@ -0,0 +1,15 @@
+use std::fmt::Debug;
+
+#[derive(Debug, Copy, Clone)]
+pub struct Vector2<T: Debug + Copy + Clone>{
+ pub x: T,
+ pub y: T
+}
+
+#[derive(Debug, Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented for this type
+pub struct AABB<K>{
+ pub loc: Vector2<K>,
+ pub size: Vector2<K>
+}
+
+fn main() {}