mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 09:13:07 +03:00
change borrowck error msg: 'declared in outer block' -> 'captured in a closure'
This commit is contained in:
@@ -467,7 +467,9 @@ fn cmt_to_str(cmt: cmt) -> str {
|
||||
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 @@ fn cmt_to_str(cmt: cmt) -> str {
|
||||
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" }
|
||||
|
||||
Reference in New Issue
Block a user