]> git.lizzy.rs Git - rust.git/blob - src/test/ui/polymorphization/promoted-function-3.rs
Rollup merge of #87440 - twetzel59:fix-barrier-no-op, r=yaahc
[rust.git] / src / test / ui / polymorphization / promoted-function-3.rs
1 // run-pass
2 // compile-flags: -Zpolymorphize=on -Zmir-opt-level=4
3
4 fn caller<T, U>() -> &'static usize {
5     callee::<U>()
6 }
7
8 fn callee<T>() -> &'static usize {
9     &std::mem::size_of::<T>()
10 }
11
12 fn main() {
13     assert_eq!(caller::<(), ()>(), &0);
14 }