mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
13 lines
203 B
Rust
13 lines
203 B
Rust
//@ run-pass
|
|
// A simple spike test for MIR version of codegen.
|
|
|
|
fn sum(x: i32, y: i32) -> i32 {
|
|
x + y
|
|
}
|
|
|
|
fn main() {
|
|
let x = sum(22, 44);
|
|
assert_eq!(x, 66);
|
|
println!("sum()={:?}", x);
|
|
}
|