summaryrefslogtreecommitdiffstats
path: root/src/test/ui/auto-traits/issue-84075.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/auto-traits/issue-84075.rs')
-rw-r--r--src/test/ui/auto-traits/issue-84075.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/auto-traits/issue-84075.rs b/src/test/ui/auto-traits/issue-84075.rs
new file mode 100644
index 000000000..a6afe24ea
--- /dev/null
+++ b/src/test/ui/auto-traits/issue-84075.rs
@@ -0,0 +1,16 @@
+// Regression test for issue #84075.
+
+#![feature(auto_traits)]
+
+auto trait Magic where Self: Copy {} //~ ERROR E0568
+impl<T: Magic> Magic for T {}
+
+fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
+
+#[derive(Debug)]
+struct NoClone;
+
+fn main() {
+ let (a, b) = copy(NoClone);
+ println!("{:?} {:?}", a, b);
+}