Sign in
fuchsia
/
third_party
/
github.com
/
rust-lang
/
rust
/
72968e519834213d69989271fd6dfb2cdc64493c
/
.
/
tests
/
ui
/
consts
/
const-cast-ptr-int.rs
blob: 68efc0c644c16fbf171ff2a2752f9bdf1ee3b514 [
file
] [
log
] [
blame
]
//@ 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
());
}