2020-07-22 05:50:26 -05:00
|
|
|
// run-pass
|
2020-08-07 09:59:29 -05:00
|
|
|
// compile-flags:-Zpolymorphize=on
|
|
|
|
|
2020-07-22 05:50:26 -05:00
|
|
|
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)();
|
|
|
|
}
|