| Age | Commit message (Collapse) | Author | Lines |
|
The beginning of the work that needs to be done as part of #28835.
:sunny:
|
|
Rust reference is a bit confusing here, because it does not explicitly mention trait objects.
See an example of confusion here https://users.rust-lang.org/t/confusion-about-impls-without-for/3379/2 :)
r? @steveklabnik
|
|
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.
|
|
Makes rustbook code playpen links follow the style set in https://github.com/rust-lang/rust/pull/28963. This is basically cut and paste from the other one. The link looks better and still works so I assume it's good.

Fixes https://github.com/rust-lang/rust/issues/29308
r? @steveklabnik
|
|
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".
|
|
Another kind of nominal types in Rust are trait objects, so the following is valid
```rust
trait A {
}
impl A {
}
```
|
|
new style
|
|
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
|
|
PR for #28157. At the moment, `rustc` emits a warning when a bare semicolon is encountered (could also be a fail, but I think this is a backwards incompatible change).
Also I am not sure where the best place for a test for that warning would be. Seems run-pass tests do not check warnings.
|
|
|
|
|
|
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.
|
|
|
|
r? @steveklabnik
|
|
|
|
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.
|
|
Closes https://github.com/rust-lang/rust/issues/29145
[breaking-change], needs a crater run.
|
|
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!
|
|
Yay, markdown isn't standardized and rustbook's parser has subtle incompatibilities with Github's! So in the Github preview you don't see that this list fails to separate from the previous paragraph. I think this should fix it, but I didn't check.
|
|
r? @steveklabnik
|
|
|
|
|
|
r? @steveklabnik
|
|
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.
|
|
|