about summary refs log tree commit diff
path: root/tests/ui/traits/self-implements-kinds-in-default-methods-8171.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/self-implements-kinds-in-default-methods-8171.rs')
-rw-r--r--tests/ui/traits/self-implements-kinds-in-default-methods-8171.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/traits/self-implements-kinds-in-default-methods-8171.rs b/tests/ui/traits/self-implements-kinds-in-default-methods-8171.rs
new file mode 100644
index 00000000000..59ea62c7690
--- /dev/null
+++ b/tests/ui/traits/self-implements-kinds-in-default-methods-8171.rs
@@ -0,0 +1,19 @@
+// https://github.com/rust-lang/rust/issues/8171
+//@ check-pass
+#![allow(dead_code)]
+
+/*
+
+#8171 Self is not recognised as implementing kinds in default method implementations
+
+*/
+
+fn require_send<T: Send>(_: T){}
+
+trait TragicallySelfIsNotSend: Send + Sized {
+    fn x(self) {
+        require_send(self);
+    }
+}
+
+pub fn main(){}