summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21922.rs
blob: 9727b2efe9a9aa549153076ee8c9ae5aebd9e7be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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);
}