summaryrefslogtreecommitdiffstats
path: root/tests/ui/polymorphization/promoted-function.rs
blob: a56a8e70e4c50153cdb2cc2fa13c6a2390893940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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)();
}