From ea03315cf40e498bd73c56664f1ed6d322eaec4a Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 8 Jul 2012 00:07:15 -0700 Subject: [PATCH] Revert "change borrowck error msg: 'declared in outer block' -> 'captured in a closure'" This change requires some tests to be updated. This reverts commit b5b8f5efccc3f39be807dd2e060e913ff263b73d. --- src/rustc/middle/borrowck.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rustc/middle/borrowck.rs b/src/rustc/middle/borrowck.rs index ec2002f8f6b..38559aec28d 100644 --- a/src/rustc/middle/borrowck.rs +++ b/src/rustc/middle/borrowck.rs @@ -467,9 +467,7 @@ impl to_str_methods for borrowck_ctxt { cat_special(sk_method) { "method" } cat_special(sk_static_item) { "static item" } cat_special(sk_self) { "self reference" } - cat_special(sk_heap_upvar) { - "captured outer variable from within a heap closure" - } + cat_special(sk_heap_upvar) { "variable declared in an outer block" } cat_rvalue { "non-lvalue" } cat_local(_) { mut_str + " local variable" } cat_binding(_) { "pattern binding" } @@ -477,7 +475,7 @@ impl to_str_methods for borrowck_ctxt { cat_deref(_, _, pk) { #fmt["dereference of %s %s pointer", mut_str, self.pk_to_sigil(pk)] } cat_stack_upvar(_) { - "captured " + mut_str + " variable from within a stack closure" + mut_str + " variable declared in an outer block" } cat_comp(_, comp_field(*)) { mut_str + " field" } cat_comp(_, comp_tuple) { "tuple content" }