Rollup merge of #26125 - nsimplex:master, r=steveklabnik

The text claimed 'any borrow must last for a _smaller_ scope than the
owner', however the accurate way of describing the comparison is
inclusive (i.e., 'less than or equal to' vs. 'less than').
This commit is contained in:
Steve Klabnik 2015-06-09 17:24:43 -04:00
commit c7de6aa342

View File

@ -151,9 +151,9 @@ As it turns out, there are rules.
Heres the rules about borrowing in Rust:
First, any borrow must last for a smaller scope than the owner. Second, you may
have one or the other of these two kinds of borrows, but not both at the same
time:
First, any borrow must last for a scope no greater than that of the owner.
Second, you may have one or the other of these two kinds of borrows, but not
both at the same time:
* one or more references (`&T`) to a resource.
* exactly one mutable reference (`&mut T`)