summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-infer-call.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/regions/regions-infer-call.rs')
-rw-r--r--tests/ui/regions/regions-infer-call.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/regions/regions-infer-call.rs b/tests/ui/regions/regions-infer-call.rs
new file mode 100644
index 000000000..248f9e923
--- /dev/null
+++ b/tests/ui/regions/regions-infer-call.rs
@@ -0,0 +1,11 @@
+// run-pass
+
+fn takes_two(x: &isize, y: &isize) -> isize { *x + *y }
+
+fn has_two<'a,'b>(x: &'a isize, y: &'b isize) -> isize {
+ takes_two(x, y)
+}
+
+pub fn main() {
+ assert_eq!(has_two(&20, &2), 22);
+}