blob: 87eb3f6224004ecc653545e4ba3ff03f567e68df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// run-pass
// Test that unsafe impl for Sync/Send can be provided for extern types.
#![feature(extern_types)]
extern "C" {
type A;
}
unsafe impl Sync for A {}
unsafe impl Send for A {}
fn assert_sync<T: ?Sized + Sync>() {}
fn assert_send<T: ?Sized + Send>() {}
fn main() {
assert_sync::<A>();
assert_send::<A>();
}
|