]> git.proxmox.com Git - rustc.git/blob - src/test/ui/no_share-struct.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / no_share-struct.rs
1 #![feature(negative_impls)]
2
3 use std::marker::Sync;
4
5 struct Foo { a: isize }
6 impl !Sync for Foo {}
7
8 fn bar<T: Sync>(_: T) {}
9
10 fn main() {
11 let x = Foo { a: 5 };
12 bar(x);
13 //~^ ERROR `Foo` cannot be shared between threads safely [E0277]
14 }