Skip to content

Commit 77e5f70

Browse files
committed
Merge pull request #5 from Manishearth/patch-1
Fix grammar
2 parents a9143a8 + 414f730 commit 77e5f70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ pub fn pop(&mut self) -> Option<T> {
253253

254254
# Deallocating
255255

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

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

0 commit comments

Comments
 (0)