2020-07-24 07:16:54 -05:00
|
|
|
// compile-flags:-Zpolymorphize=on
|
2020-07-22 09:35:52 -05:00
|
|
|
// build-pass
|
|
|
|
|
|
|
|
fn test<T>() {
|
|
|
|
std::mem::size_of::<T>();
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn foo<T>(_: T) -> &'static fn() {
|
|
|
|
&(test::<T> as fn())
|
|
|
|
}
|
|
|
|
|
|
|
|
fn outer<T>() {
|
|
|
|
foo(|| ());
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
outer::<u8>();
|
|
|
|
}
|