Skip to content

Commit

Permalink
Minor change.
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeep-datta committed Feb 11, 2016
1 parent 50d179e commit a8fd1bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/book/ownership.md
Expand Up @@ -171,10 +171,10 @@ v2.truncate(2);

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

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

Expand Down

0 comments on commit a8fd1bb

Please sign in to comment.