summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-borrow-evec-fixed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/regions/regions-borrow-evec-fixed.rs')
-rw-r--r--tests/ui/regions/regions-borrow-evec-fixed.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/regions/regions-borrow-evec-fixed.rs b/tests/ui/regions/regions-borrow-evec-fixed.rs
new file mode 100644
index 000000000..ed828312b
--- /dev/null
+++ b/tests/ui/regions/regions-borrow-evec-fixed.rs
@@ -0,0 +1,10 @@
+// run-pass
+
+fn foo(x: &[isize]) -> isize {
+ x[0]
+}
+
+pub fn main() {
+ let p = &[1,2,3,4,5];
+ assert_eq!(foo(p), 1);
+}