From 9d6ab9ae2326ef130a1a43876f49f00933d234e6 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 15 Nov 2012 18:59:46 -0800 Subject: [PATCH] Update error message and un-xfail test --- src/test/compile-fail/regions-var-type-out-of-scope.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/compile-fail/regions-var-type-out-of-scope.rs b/src/test/compile-fail/regions-var-type-out-of-scope.rs index bb40a436fba..cfa28830f02 100644 --- a/src/test/compile-fail/regions-var-type-out-of-scope.rs +++ b/src/test/compile-fail/regions-var-type-out-of-scope.rs @@ -1,12 +1,11 @@ -// xfail-test - fn foo(cond: bool) { // Here we will infer a type that uses the // region of the if stmt then block: - let mut x; //~ ERROR foo + let mut x; if cond { - x = &3; + x = &3; //~ ERROR illegal borrow: borrowed value does not live long enough + assert (*x == 3); } }