2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_upper_case_globals)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2013-05-24 19:35:29 -07:00
|
|
|
use std::ptr;
|
|
|
|
|
2014-12-06 11:39:25 -05:00
|
|
|
struct TestStruct {
|
|
|
|
x: *const u8
|
|
|
|
}
|
|
|
|
|
2014-12-22 00:49:42 +01:00
|
|
|
unsafe impl Sync for TestStruct {}
|
2014-12-06 11:39:25 -05:00
|
|
|
|
|
|
|
static a: TestStruct = TestStruct{x: 0 as *const u8};
|
2013-03-07 15:35:43 -05:00
|
|
|
|
2013-03-27 09:58:28 -07:00
|
|
|
pub fn main() {
|
2014-12-06 11:39:25 -05:00
|
|
|
assert_eq!(a.x, ptr::null());
|
2013-03-06 19:09:17 -08:00
|
|
|
}
|