rust/tests/ui/issues/issue-21922.rs

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

18 lines
307 B
Rust
Raw Normal View History

// run-pass
2015-09-29 14:19:24 +00:00
use std::ops::Add;
fn show(z: i32) {
println!("{}", z)
}
fn main() {
let x = 23;
let y = 42;
show(Add::add( x, y));
show(Add::add( x, &y));
show(Add::add(&x, y));
show(Add::add(&x, &y));
show( x + y);
show( x + &y);
show(&x + y);
show(&x + &y);
}