Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
polymorphization
/
promoted-function.rs
blob: 057daf4e7575024c29b47955881b7eecc25299ba [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
//@ compile-flags:-Zpolymorphize=on
fn
fop
<
T
>()
{}
fn
bar
<
T
>()
->
&
'
static
fn
()
{
&(
fop
::<
T
>
as
fn
())
}
pub
const
FN
:
&
'
static
fn
()
=
&(
fop
::<
i32
>
as
fn
());
fn
main
()
{
bar
::<
u32
>();
bar
::<
i32
>();
(
FN
)();
}