| Age | Commit message (Collapse) | Author | Lines |
|
The book was located under 'src/doc/trpl' because originally, it was
going to be hosted under that URL. Late in the game, before 1.0, we
decided that /book was a better one, so we changed the output, but
not the input. This causes confusion for no good reason. So we'll change
the source directory to look like the output directory, like for every
other thing in src/doc.
|
|
Change conditional perfect to past perfect.
|
|
Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines
|
|
Sorry I didn’t get this in the last PR (#28864), I hadn’t thought of it.
|
|
Grammatical update (and passive -> active, but I'm not sure if "Rust" is often used as a subject in the book; feel free to revert that part for style, but keep the subject-verb agreement)
|
|
|
|
As mentioned in #25893 the copy trait is not very well explained for beginners. There is no clear mention that all primitive types implement the copy trait and there are not a lot of examples.
With this change I try to make it more visible and understandable for new users.
I myself have struggled with this, see [my question on stackoverflow](http://stackoverflow.com/questions/30540419/why-are-booleans-copyable-even-though-the-documentation-doesnt-indicate-that). And I want to make it more transparent for others.
I filed issue #25893 but I thought that I could give it a shot myself to relieve some of the work from the devs :)
If it is not well written or there are some changes to be made before it can be merged, let me know.
Cheers,
Mathieu
|
|
|
|
The text in iterators.md wasn't wrong, but it read awkwardly to my ear.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Also, as @huonw guessed, move semantics really _does_ make more sense as
a sub-chapter of ownership.
|
|
|
|
|
|
|
|
to make it more clear.
|
|
|
|
The first commit adds a short note which I believe will reduce worries in people who work with closures very often and read the Rust book for their first time.
The second commit consists solely of tiny typo fixes. In some cases, I changed "logical" quotations like
She said, "I like programming".
to
She said, "I like programming."
because the latter seems to be the prevalent style in the book.
|
|
Replaced outdated use of the `range(start, end)` function where
approriate with `start..end`, and tweaked the examples to compile and run with the latest rust. I also fixed two periphery compile issues in reference.md which were occluding whether there were any new errors created by these changes, so I fixed them.
|
|
|
|
The spelling corrections were made in both documentation comments and
regular comments.
|
|
Lifetime elision with two input references is not clear.
Closes #21284
|
|
|
|
The reference should be `x`, not `FOO` itself.
|
|
"Idiomatic code should not use extra whitespace in the middle of a line to provide alignment."
http://aturon.github.io/style/whitespace.html
I realize the linked page still needs an RFC, but the docs should be written in accordance with the guidelines nevertheless.
|
|
|
|
Fix all usage of int/uint/i/u in the book.
|
|
Fix commented graphs in src/doc/trpl/ownership.md
Reviewed-by: huonw
|
|
|
|
Fixes #19924
|
|
Fixes #19924
|
|
|
|
`int` doesn't exist anymore. Usage of its equivalent `isize` is
discouraged since its size is platform-dependent. `i32` is used instead
in the examples. Also, integer suffixes aren't needed in the examples
anymore so we can just write `5` instead of `5i`.
|
|
Remove extra dangling period
Reviewed-by: alexcrichton
|
|
Signed-off-by: Raul Gutierrez S <rgs@itevenworks.net>
|
|
This commit is an attempt to standardize the use of punctuation and
formatting in "The Rust Programming Language" as discussed in #19823.
- Convert bold text to italicized textcwhen referring to terminology.
- Convert single-quoted text to italicized or double-quoted text,
depending on context.
- Use double quotes only in the case of scare quotes or quotations.
|
|
|