From ed7d1be12f61e8a863c8c1cb645ca12f9ce38721 Mon Sep 17 00:00:00 2001 From: John Kleint Date: Sun, 12 Oct 2014 23:50:22 -0400 Subject: [PATCH] Guide: specify that both shared and mutable borrows can be re-lent. --- src/doc/guide.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/doc/guide.md b/src/doc/guide.md index 4e9966cb3db2a..d507812478e94 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -3538,9 +3538,8 @@ restriction: 1. If the borrow is immutable, you may read the data the pointer points to. 2. If the borrow is mutable, you may read and write the data the pointer points to. -3. You may lend the pointer to someone else in an immutable fashion, **BUT** -4. When you do so, they must return it to you before you must give your own - borrow back. +3. You may lend the pointer to someone else, **BUT** +4. When you do so, they must return it before you can give your own borrow back. This last requirement can seem odd, but it also makes sense. If you have to return something, and you've lent it to someone, they need to give it back to