]> git.lizzy.rs Git - rust.git/blob - src/test/ui/no_send-enum.rs
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / test / ui / no_send-enum.rs
1 #![feature(negative_impls)]
2
3 use std::marker::Send;
4
5 struct NoSend;
6 impl !Send for NoSend {}
7
8 enum Foo {
9     A(NoSend)
10 }
11
12 fn bar<T: Send>(_: T) {}
13
14 fn main() {
15     let x = Foo::A(NoSend);
16     bar(x);
17     //~^ ERROR `NoSend` cannot be sent between threads safely
18 }