rust/tests/ui/polymorphization/promoted-function.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
237 B
Rust
Raw Normal View History

2020-07-22 05:50:26 -05:00
// run-pass
// 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)();
}