about summary refs log tree commit diff
path: root/src/test/compile-fail/no_share-struct.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/no_share-struct.rs')
-rw-r--r--src/test/compile-fail/no_share-struct.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/test/compile-fail/no_share-struct.rs b/src/test/compile-fail/no_share-struct.rs
index c7028ce9786..b5ccceb3b2a 100644
--- a/src/test/compile-fail/no_share-struct.rs
+++ b/src/test/compile-fail/no_share-struct.rs
@@ -8,14 +8,17 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::marker;
+#![feature(optin_builtin_traits)]
 
-struct Foo { a: isize, m: marker::NoSync }
+use std::marker::Sync;
+
+struct Foo { a: isize }
+impl !Sync for Foo {}
 
 fn bar<T: Sync>(_: T) {}
 
 fn main() {
-    let x = Foo { a: 5, m: marker::NoSync };
+    let x = Foo { a: 5 };
     bar(x);
     //~^ ERROR the trait `core::marker::Sync` is not implemented
 }