]>
Commit | Line | Data |
---|---|---|
b7449926 XL |
1 | // run-pass |
2 | #![allow(non_upper_case_globals)] | |
c34b1796 | 3 | |
970d7e83 LB |
4 | use std::ptr; |
5 | ||
1a4d82fc JJ |
6 | struct TestStruct { |
7 | x: *const u8 | |
8 | } | |
9 | ||
10 | unsafe impl Sync for TestStruct {} | |
11 | ||
12 | static a: TestStruct = TestStruct{x: 0 as *const u8}; | |
223e47cc LB |
13 | |
14 | pub fn main() { | |
1a4d82fc | 15 | assert_eq!(a.x, ptr::null()); |
223e47cc | 16 | } |