We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8236c2e + 4e85201 commit 1ff0f8eCopy full SHA for 1ff0f8e
src/scope/borrow.md
@@ -34,10 +34,12 @@ fn main() {
34
let _ref_to_i32: &i32 = &boxed_i32;
35
36
// Error!
37
- // 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.
38
eat_box_i32(boxed_i32);
39
// FIXME ^ Comment out this line
40
41
+ // Attempt to borrow `_ref_to_i32` after inner value is destroyed
42
+ borrow_i32(_ref_to_i32);
43
// `_ref_to_i32` goes out of scope and is no longer borrowed.
44
}
45
0 commit comments