Skip to content

Commit a8fd1bb

Browse files
committed
Minor change.
1 parent 50d179e commit a8fd1bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/book/ownership.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ v2.truncate(2);
171171

172172
and `v1` were still accessible we'd end up with an invalid vector since it
173173
would not know that the heap data has been truncated. Now, the part of the
174-
vector `v1` on the stack does not agree with its corresponding part on the
174+
vector `v1` on the stack does not agree with the corresponding part on the
175175
heap. `v1` still thinks there are three elements in the vector and will
176176
happily let us access the non existent element `v1[2]` but as you might
177-
already know this is a recipe for disaster.
177+
already know this is a recipe for disaster (might lead to a segfault).
178178

179179
This is why Rust forbids using `v` after we’ve done the move.
180180

0 commit comments

Comments
 (0)