diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2012-07-06 18:16:09 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2012-07-06 22:30:50 -0400 |
| commit | b5b8f5efccc3f39be807dd2e060e913ff263b73d (patch) | |
| tree | 9b562788e3203a01c22d3b9aa64330f62db0ab7c /src | |
| parent | c4af6e92fbae171c56a4e68666025725555fc9d8 (diff) | |
| download | rust-b5b8f5efccc3f39be807dd2e060e913ff263b73d.tar.gz rust-b5b8f5efccc3f39be807dd2e060e913ff263b73d.zip | |
change borrowck error msg: 'declared in outer block' -> 'captured in a closure'
Diffstat (limited to 'src')
| -rw-r--r-- | src/rustc/middle/borrowck.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rustc/middle/borrowck.rs b/src/rustc/middle/borrowck.rs index 38559aec28d..ec2002f8f6b 100644 --- a/src/rustc/middle/borrowck.rs +++ b/src/rustc/middle/borrowck.rs @@ -467,7 +467,9 @@ 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) { "variable declared in an outer block" } + cat_special(sk_heap_upvar) { + "captured outer variable from within a heap closure" + } cat_rvalue { "non-lvalue" } cat_local(_) { mut_str + " local variable" } cat_binding(_) { "pattern binding" } @@ -475,7 +477,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(_) { - mut_str + " variable declared in an outer block" + "captured " + mut_str + " variable from within a stack closure" } cat_comp(_, comp_field(*)) { mut_str + " field" } cat_comp(_, comp_tuple) { "tuple content" } |
