about summary refs log tree commit diff
path: root/tests/ui/error-codes/E0277-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0277-2.rs')
-rw-r--r--tests/ui/error-codes/E0277-2.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0277-2.rs b/tests/ui/error-codes/E0277-2.rs
new file mode 100644
index 00000000000..428518705b8
--- /dev/null
+++ b/tests/ui/error-codes/E0277-2.rs
@@ -0,0 +1,18 @@
+struct Foo {
+    bar: Bar
+}
+
+struct Bar {
+    baz: Baz
+}
+
+struct Baz {
+    x: *const u8
+}
+
+fn is_send<T: Send>() { }
+
+fn main() {
+    is_send::<Foo>();
+    //~^ ERROR `*const u8` cannot be sent between threads safely
+}