]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-fn-nested.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / consts / const-fn-nested.rs
1 // run-pass
2 // Test a call whose argument is the result of another call.
3
4 const fn sub(x: u32, y: u32) -> u32 {
5 x - y
6 }
7
8 const X: u32 = sub(sub(88, 44), 22);
9
10 fn main() {
11 assert_eq!(X, 22);
12 }