diff --git a/src/scope/borrow.md b/src/scope/borrow.md index e38b717b89..72c70e736a 100644 --- a/src/scope/borrow.md +++ b/src/scope/borrow.md @@ -34,10 +34,12 @@ fn main() { let _ref_to_i32: &i32 = &boxed_i32; // Error! - // Can't destroy `boxed_i32` while the inner value is borrowed. + // Can't destroy `boxed_i32` while the inner value is borrowed later in scope. eat_box_i32(boxed_i32); // FIXME ^ Comment out this line + // Attempt to borrow `_ref_to_i32` after inner value is destroyed + borrow_i32(_ref_to_i32); // `_ref_to_i32` goes out of scope and is no longer borrowed. }