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