Sign in
rust
/
miri
/
refs/heads/rustc_doublecheck
/
.
/
tests
/
fail
/
function_pointers
/
deref_fn_ptr.rs
blob: 3510f41361a0e49124b96103eb0cb057bd539566 [
file
] [
log
] [
blame
] [
edit
]
fn
f
()
{}
fn
main
()
{
let
x
:
u8
=
unsafe
{
*
std
::
mem
::
transmute
::<
fn
(),
*
const
u8
>(
f
)
//~ ERROR: contains a function
};
panic
!(
"this should never print: {}"
,
x
);
}