Skip to content

Commit c98a697

Browse files
committed
---
yaml --- r: 236045 b: refs/heads/stable c: 0f92455 h: refs/heads/master i: 236043: 3338ad7 v: v3
1 parent e28b667 commit c98a697

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 77e5f70460fd0966c2b593f9f8419de01d4b7857
32+
refs/heads/stable: 0f924555e50bbc9b5e7d408c5230510d4a5bc9de
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/vec.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% Example: Implementing Vec
22

33
To bring everything together, we're going to write `std::Vec` from scratch.
4-
Because the all the best tools for writing unsafe code are unstable, this
4+
Because all the best tools for writing unsafe code are unstable, this
55
project will only work on nightly (as of Rust 1.2.0).
66

77

@@ -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 leak tons of resources.
256+
Next we should implement Drop so that we don't massively leaks 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)