]> git.lizzy.rs Git - rust.git/blob - tests/ui/polymorphization/promoted-function.rs
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / ui / polymorphization / promoted-function.rs
1 // run-pass
2 // compile-flags:-Zpolymorphize=on
3
4 fn fop<T>() {}
5
6 fn bar<T>() -> &'static fn() {
7     &(fop::<T> as fn())
8 }
9 pub const FN: &'static fn() = &(fop::<i32> as fn());
10
11 fn main() {
12     bar::<u32>();
13     bar::<i32>();
14     (FN)();
15 }