mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
13 lines
200 B
Rust
13 lines
200 B
Rust
// run-pass
|
|
// Test a call whose argument is the result of another call.
|
|
|
|
const fn sub(x: u32, y: u32) -> u32 {
|
|
x - y
|
|
}
|
|
|
|
const X: u32 = sub(sub(88, 44), 22);
|
|
|
|
fn main() {
|
|
assert_eq!(X, 22);
|
|
}
|