Corrected "Ownership":
- [`Variable bindings`] link was not processed properly.
- Changed the paragraph about move semantics with two vectors, because it was confusing.
- Removed "So it may not be as inefficient as it initially seems", because there is nothing that seems inefficient in copying pointers only.
- Other text corrections.
Fixed copied-and-pasted text mistakes.
Revised the paragraph about moving a vector (taking into account suggestions by echochamber).
Fixed markdown.
Fixes requested by steveklabnik.
Brought back a sentence about supposed inefficiency.
There were still some mentions of `~[T]` and `~T`, mostly in comments and debugging statements. I tried to do my best to preserve meaning, but I might have gotten some wrong-- I'm happy to fix anything :)
Between ffc5f1c, when grammar.md was created by copying parts of the
reference, and 8cf2552, when all EBNF was removed from reference.md,
there were parts of the grammar that were updated in reference.md but
not grammar.md, and then they weren't copied over because they existed
already, but they were slightly out of date.
Example: the `path_item : ident | "self" ;` rule in Use declarations was
changed from "mod" to "self" in the reference in 195fd9a but wasn't
updated in the grammar.
The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time.
For the changed example see http://is.gd/28ak9E
I think there's a trivial missing word in the Mutability document. I reformatted the resulting paragraph in vim, which seems to match what the rest of the document is doing as far as word wrapping.
Edit: I found another minor thing as I continued reading.
P.S. I'm re-reading the docs, since so much has changed since my first read, and they've gotten even better! Nice job!
r? @steveklabnik
I was profiling my code again and this time AsRef<str> for String
was eating up a considerable chunk of my runtime; adding the inline
annotation made the program run almost twice as fast!
While I was at it I also added the annotation to other implementations
of AsRef as well as AsMut.