summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs (renamed from src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs)3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs
index bdd6cb79b..00f50c33e 100644
--- a/src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-3.rs
@@ -8,10 +8,9 @@ struct Point {
fn main() {
let mut c = {
let mut p = Point {x: "1".to_string(), y: "2".to_string() };
- || {
+ || { //~ ERROR closure may outlive the current block, but it borrows `p`
let x = &mut p.x;
println!("{:?}", p);
- //~^ ERROR `p` does not live long enough
}
};
c();