blob: 3cac1aabea99e5b8b0c1ce226b9fe83ff0575c71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Make sure extern types are !Sync and !Send.
#![feature(extern_types, sized_hierarchy)]
use std::marker::PointeeSized;
extern "C" {
type A;
}
fn assert_sync<T: PointeeSized + Sync>() {}
fn assert_send<T: PointeeSized + Send>() {}
fn main() {
assert_sync::<A>();
//~^ ERROR `A` cannot be shared between threads safely [E0277]
assert_send::<A>();
//~^ ERROR `A` cannot be sent between threads safely [E0277]
}
|