rust/tests/ui/issues/issue-21922.rs
2023-01-11 09:32:08 +00:00

18 lines
307 B
Rust

// run-pass
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);
}