]>
Commit | Line | Data |
---|---|---|
ba9703b0 | 1 | #![feature(negative_impls)] |
223e47cc | 2 | |
c34b1796 AL |
3 | struct MySendable { |
4 | t: *mut u8 | |
5 | } | |
1a4d82fc | 6 | |
c34b1796 | 7 | unsafe impl Send for MySendable {} |
223e47cc | 8 | |
c34b1796 AL |
9 | struct MyNotSendable { |
10 | t: *mut u8 | |
11 | } | |
12 | ||
13 | impl !Send for MyNotSendable {} | |
14 | ||
15 | fn is_send<T: Send>() {} | |
16 | ||
17 | fn main() { | |
18 | is_send::<MySendable>(); | |
19 | is_send::<MyNotSendable>(); | |
8faf50e0 | 20 | //~^ ERROR `MyNotSendable` cannot be sent between threads safely |
c34b1796 | 21 | } |