]>
Commit | Line | Data |
---|---|---|
ba9703b0 | 1 | #![feature(negative_impls)] |
85aaf69f SL |
2 | |
3 | use std::marker::Send; | |
4 | ||
5 | struct NoSend; | |
6 | impl !Send for NoSend {} | |
1a4d82fc JJ |
7 | |
8 | enum Foo { | |
85aaf69f | 9 | A(NoSend) |
1a4d82fc | 10 | } |
970d7e83 LB |
11 | |
12 | fn bar<T: Send>(_: T) {} | |
223e47cc LB |
13 | |
14 | fn main() { | |
85aaf69f | 15 | let x = Foo::A(NoSend); |
1a4d82fc | 16 | bar(x); |
8faf50e0 | 17 | //~^ ERROR `NoSend` cannot be sent between threads safely |
223e47cc | 18 | } |