summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21922.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-21922.rs')
-rw-r--r--tests/ui/issues/issue-21922.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-21922.rs b/tests/ui/issues/issue-21922.rs
new file mode 100644
index 000000000..9727b2efe
--- /dev/null
+++ b/tests/ui/issues/issue-21922.rs
@@ -0,0 +1,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);
+}