Skip to content

Commit

Permalink
Merge pull request #5 from Manishearth/patch-1
Browse files Browse the repository at this point in the history
Fix grammar
  • Loading branch information
Gankra committed Jun 25, 2015
2 parents a9143a8 + 414f730 commit 77e5f70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vec.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ pub fn pop(&mut self) -> Option<T> {

# Deallocating

Next we should implement Drop so that we don't massively leaks tons of resources.
Next we should implement Drop so that we don't massively leak tons of resources.
The easiest way is to just call `pop` until it yields None, and then deallocate
our buffer. Note that calling `pop` is uneeded if `T: !Drop`. In theory we can
ask Rust if T needs_drop and omit the calls to `pop`. However in practice LLVM
Expand Down Expand Up @@ -442,9 +442,9 @@ end = ptr.offset(len)
```

However because `offset` is marked as a GEP inbounds instruction, this will tell
llVM that ptr is allocated and won't alias other allocated memory. This is fine
LLVM that ptr is allocated and won't alias other allocated memory. This is fine
for zero-sized types, as they can't alias anything. However if we're using
heap::EMPTY as a sentinel for a non-allocation for a *non-zero-sized* type,
`heap::EMPTY` as a sentinel for a non-allocation for a *non-zero-sized* type,
this can cause undefined behaviour. Alas, we must therefore special case either
cap or len being 0 to not do the offset.

Expand Down

0 comments on commit 77e5f70

Please sign in to comment.