summary refs log tree commit diff
path: root/tests/ui/polymorphization/promoted-function-3.rs
blob: 2ac06d5a139ae61a593c55baf4f85580a2951ec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ run-pass
//@ compile-flags: -Zpolymorphize=on -Zmir-opt-level=4

fn caller<T, U>() -> &'static usize {
    callee::<U>()
}

fn callee<T>() -> &'static usize {
    &std::mem::size_of::<T>()
}

fn main() {
    assert_eq!(caller::<(), ()>(), &0);
}