]> git.lizzy.rs Git - rust.git/commit
s/Second borrow/Previous borrow/ in error messages.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 17 Dec 2013 12:55:33 +0000 (20:55 +0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 17 Dec 2013 13:10:57 +0000 (21:10 +0800)
commit4584acdf4c5824e020c738f0c89e86021ac531c0
treeb5da3d71eceafdbc9db456fc61ed9643eab2867c
parentdc65762d7923a9e66e8e5d743cb8b2d2fdd3cde5
s/Second borrow/Previous borrow/ in error messages.

When a borrow occurs twice illegally, Rust will label the other borrow
as the "second borrow".  This is quite confusing, as the "second borrow"
usually happened before the flagged borrow (e.g. as far as dataflow
is concerned, the first borrow is OK, the second borrow is illegal.)
This patch renames "second borrow" to "previous borrow", to make the
spatial relationship between the two borrows clearer.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
src/librustc/middle/borrowck/check_loans.rs