2018-01-27 05:02:45 -06:00
|
|
|
use std::marker::PhantomData;
|
|
|
|
|
|
|
|
struct AssertSync<T: Sync>(PhantomData<T>);
|
|
|
|
|
|
|
|
pub struct Foo {
|
|
|
|
bar: *const Bar,
|
|
|
|
phantom: PhantomData<Bar>,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Bar {
|
|
|
|
foo: *const Foo,
|
|
|
|
phantom: PhantomData<Foo>,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2018-09-29 20:41:49 -05:00
|
|
|
let _: AssertSync<Foo> = unimplemented!();
|
|
|
|
//~^ ERROR E0277
|
|
|
|
//~| ERROR E0277
|
2018-01-27 05:02:45 -06:00
|
|
|
}
|