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