summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-13497-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-13497-2.rs')
-rw-r--r--tests/ui/issues/issue-13497-2.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-13497-2.rs b/tests/ui/issues/issue-13497-2.rs
new file mode 100644
index 000000000..c82da0f00
--- /dev/null
+++ b/tests/ui/issues/issue-13497-2.rs
@@ -0,0 +1,7 @@
+fn read_lines_borrowed<'a>() -> Vec<&'a str> {
+ let rawLines: Vec<String> = vec!["foo ".to_string(), " bar".to_string()];
+ rawLines //~ ERROR cannot return value referencing local variable `rawLines`
+ .iter().map(|l| l.trim()).collect()
+}
+
+fn main() {}