]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/no_share-struct.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / test / compile-fail / no_share-struct.rs
index 7bb7d86e8d870d309a50a6bafdf6fce54b00fe35..1379a9f7382b006678b007d268ecf93238a305eb 100644 (file)
 
 use std::kinds::marker;
 
-struct Foo { a: int, m: marker::NoShare }
+struct Foo { a: int, m: marker::NoSync }
 
-fn bar<T: Share>(_: T) {}
+fn bar<T: Sync>(_: T) {}
 
 fn main() {
-    let x = Foo { a: 5, m: marker::NoShare };
+    let x = Foo { a: 5, m: marker::NoSync };
     bar(x);
-    //~^ ERROR instantiating a type parameter with an incompatible type `Foo`,
-    //         which does not fulfill `Share`
+    //~^ ERROR the trait `core::kinds::Sync` is not implemented
 }