rust/tests/ui/polymorphization/issue-74636.rs
2023-01-11 09:32:08 +00:00

17 lines
216 B
Rust

// compile-flags:-Zpolymorphize=on
// build-pass
use std::any::TypeId;
pub fn foo<T: 'static>(_: T) -> TypeId {
TypeId::of::<T>()
}
fn outer<T: 'static>() {
foo(|| ());
}
fn main() {
outer::<u8>();
}