rust/tests/ui/mir/mir_codegen_spike1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
202 B
Rust
Raw Normal View History

// run-pass
2018-05-08 13:10:16 +00:00
// 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);
}