Sign in
fuchsia
/
third_party
/
rust
/
346aec9b02f3c74f3fce97fd6bda24709d220e49
/
.
/
src
/
test
/
ui
/
consts
/
const-cast-ptr-int.rs
blob: 987d9616e9152dac523112811190709f25c444b8 [
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
());
}