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