]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-fn-nested.rs
Rollup merge of #106718 - lcnr:solver-cycles, r=compiler-errors
[rust.git] / tests / 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 }