mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
17 lines
246 B
Rust
17 lines
246 B
Rust
//@ run-pass
|
|
#![allow(non_upper_case_globals)]
|
|
|
|
use std::ptr;
|
|
|
|
struct TestStruct {
|
|
x: *const u8
|
|
}
|
|
|
|
unsafe impl Sync for TestStruct {}
|
|
|
|
static a: TestStruct = TestStruct{x: 0 as *const u8};
|
|
|
|
pub fn main() {
|
|
assert_eq!(a.x, ptr::null());
|
|
}
|