| Age | Commit message (Collapse) | Author | Lines |
|
The beginning of the work that needs to be done as part of #28835.
:sunny:
|
|
As displayed before this commit, I found the book confusing in its
explanation of `#`-led comments in `rust` blocks. Possibly the
biggest confusion was because the many-dashes construct does not
become an HR element in the Markdown translator used, so things were
not being properly set off.
This change should more clearly show the as-rendered content as
rendered, and the as-coded content as code.
|
|
The beginning of the work that needs to be done as part of #28835.
|
|
As is, this attr would lead to the "///" prefix being in the output text.
|
|
I somehow missed a word behind the numbers while going through this section, don't know what the best approach would be though since "**available** addresses" sounds good to me, too".
|
|
As displayed before this commit, I found the book confusing in its
explanation of `#`-led comments in `rust` blocks. Possibly the
biggest confusion was because the many-dashes construct does not
become an HR element in the Markdown translator used, so things were
not being properly set off.
This change should more clearly show the as-rendered content as
rendered, and the as-coded content as code.
|
|
As is, this attr would lead to the "///" prefix being in the output text
|
|
|
|
r=Manishearth
It's possible that there is some meaning I'm not grasping from the headers "Traits bounds for generic functions" and "Traits bounds for generic structs", but they seem to me like they could be clearer and more grammatically correct.
|
|
|
|
|
|
When reading this paragraph, the beginning Rust programmer is starting
to write a Hello World program. We have just told her to name the file
`main.rs`, and immediately afterward, a `hello_world.rs` is mentioned.
I changed this to an unrelated filename (incidentally one that appears
in this repository) to make it clear that this is just an example.
Also, wording it as a declarative sentence rather than an imperative one
further separates it from the Hello World instructions in this section.
r? @steveklabnik
(Let me know if I'm sending too many PRs -- I can batch up TRPL edits, say, per chapter, if that works better. Or I can just refrain from editing TRPL as I read through it, if these are not sufficiently useful.)
|
|
The paragraph here seemed confusing, so I reworded it. Also added
another possible reason why `curl | sh` might be objectionable to users.
r? @steveklabnik
|
|
r? @steveklabnik
|
|
|
|
|
|
|
|
|
|
This commit expands the "supported platforms" section of the book to include
documentation on the tiers that Rust currently has as well as organizing all
supported platforms into these various tiers. Infrastructure improvements over
the next few months are likely to change the location of may of these platforms
over, but for now this should faithfully represent what we've got today!
|
|
|
|
When reading this paragraph, the beginning Rust programmer is starting
to write a Hello World program. We have just told her to name the file
`main.rs`, and immediately afterward, a `hello_world.rs` is mentioned.
I changed this to an unrelated filename (incidentally one that appears
in this repository) to make it clear that this is just an example.
Also, wording it as a declarative sentence rather than an imperative one
further separates it from the Hello World instructions in this section.
|
|
This commit expands the "supported platforms" section of the book to include
documentation on the tiers that Rust currently has as well as organizing all
supported platforms into these various tiers. Infrastructure improvements over
the next few months are likely to change the location of may of these platforms
over, but for now this should faithfully represent what we've got today!
|
|
|
|
Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines.
This PR was created semiautomatically.
|
|
The paragraph here seemed confusing, so I reworded it. Also added
another possible reason why `curl | sh` might be objectionable to users.
|
|
Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines
|
|
To augment the didactic effect, made placed the thread::sleep_ms call in the last example, so that there will be time for the other locks to happen; without this, I was unable to observe the deadlock in over 1,000 runs when there was no left-handed philosopher.
|
|
|
|
|
|
Change the spacing/order of lines in the final pointer conversion example to make it more clear.
Very small change, can be rolled up.
|
|
When going through the docs, it is not clear that binary files cannot be tested. Additionally, it is hard to find the proper structure of a Rust crate and it took me several hours of looking through the docs to find the crates and modules section. I think we can link to it from here and it will be beneficial to those who are coming to the language.
|
|
Fixed some typos and changed the link to the link to crates-and-modules to be dynamic.
|
|
Change the spacing/order of lines in the final pointer conversion example to make it more clear.
|
|
|
|
cc @nagisa
|
|
|
|
When going through the docs, it is not clear that binary files cannot be tested. Additionally, it is hard to find the proper structure of a Rust crate and it took me several hours of looking through the docs to find the crates and modules section. I think we can link to it from here and it will be beneficial to those who are coming to the language.
|
|
|
|
Regarding [#29063 _[Docs] Terminology inconsistency between 'iterator adapters' and 'iterator adaptors'_](https://github.com/rust-lang/rust/issues/29063) :
This PR replaces 'iterator adapters' appearances (in TRPL book) to 'iterator adaptors', thus embracing the terminology used along the API docs and achieving consistency between both sources.
|
|
Before this commit, the first "A Rust library" code sample produced
the following compilation warning:
```
test.rs:7:22: 7:36 warning: unnecessary parentheses around `for` head
expression, #[warn(unused_parens)] on by default
test.rs:7 for _ in (0..5_000_000) {
```
This commit just removes the parens around the range 0..5_000_000 thereby removing the compilation warning.
|
|
|
|
|
|
r? @steveklabnik
|
|
Regarding #29063: Replace 'iterator adapters' appearances to
'iterator adaptors', thus embracing the terminology used along the
API docs and achieving consistency between both sources.
|
|
|
|
|
|
Before this commit, the first "A Rust library" code sample produced
the following compilation warning:
```
test.rs:7:22: 7:36 warning: unnecessary parentheses around `for` head
expression, #[warn(unused_parens)] on by default
test.rs:7 for _ in (0..5_000_000) {
```
This commit just removes the parens around the range 0..5_000_000.
|
|
r=alexcrichton
This link was added in #28842 but doesn't work at https://doc.rust-lang.org/nightly/book/lifetimes.html. What works in my markdown preview doesn't work live, and vice versa.
|
|
Just a single-character typo fix.
|
|
r? @steveklabnik
|