Commit Graph
1586 Commits
Author SHA1 Message Date
Carol (Nichols || Goulding) 5bb44f8b5b Make some further edits to #2447 2020-12-18 20:07:31 -05:00
Carol (Nichols || Goulding) 77e1f2ae93 Merge remote-tracking branch 'origin/pr/2447' 2020-12-18 20:05:01 -05:00
Carol (Nichols || Goulding) d7b29fa9c3 Remove copied and dangling link brackets 2020-12-18 19:58:08 -05:00
Carol (Nichols || Goulding) 5b2bd2b3c7 Merge remote-tracking branch 'origin/pr/2359' 2020-12-18 19:56:41 -05:00
Steve Klabnik b702f3bb15 Merge pull request #1752 from rust-lang/gh1744
Remove an uneeded 'static lifetime
2020-12-14 10:24:47 -06:00
Carol (Nichols || Goulding) b4e5fcc554 Fixes #2330. Clarify why the lock is held too long 2020-12-13 21:09:07 -05:00
Carol (Nichols || Goulding) 4275162b3f Explain that we do need to have 'static now 2020-12-10 22:12:51 -05:00
Carol (Nichols || Goulding) 0b81c3bd0c Remove an unneeded link 2020-12-10 22:12:45 -05:00
Carol (Nichols || Goulding) def6530bfa I think this code formatted string literal should include the quotes 2020-12-10 22:12:23 -05:00
Steve Klabnik 360960eb3f Remove an uneeded 'static lifetime
Fixes #1744
2020-12-10 22:11:40 -05:00
Carol (Nichols || Goulding) 15b20d3c6d Merge pull request #2304 from rashiq/rashiq-chapter-1.2-rusftmt
Update paragraph about rustfmt in Chapter 1.2
2020-12-10 21:30:28 -05:00
Carol (Nichols || Goulding) 015d14864d Clarify language around further from #2418 2020-12-10 21:27:22 -05:00
Carol (Nichols || Goulding) 1686f99a22 Merge remote-tracking branch 'origin/pr/2418' 2020-12-10 21:21:37 -05:00
Carol (Nichols || Goulding) b34bb93b2d Add some further edits to #2433 2020-12-09 21:50:40 -05:00
Carol (Nichols || Goulding) 14e2174a58 Merge remote-tracking branch 'origin/pr/2433' 2020-12-09 21:48:41 -05:00
Carol (Nichols || Goulding) 6b111ac28e Note all the method families to handle integer overflow 2020-12-09 21:45:27 -05:00
Carol (Nichols || Goulding) c120b9f2cd Merge remote-tracking branch 'origin/pr/2405' 2020-12-09 21:35:12 -05:00
Carol (Nichols || Goulding) cdb13945ac Fix #1855 - incorporate new reference cycle diagram 2020-12-09 21:30:50 -05:00
Carol (Nichols || Goulding) d28183f901 Make some further edits to the changes in #1886 2020-12-09 21:30:13 -05:00
Carol (Nichols || Goulding) ea49874970 Merge remote-tracking branch 'origin/pr/1886' 2020-12-09 21:14:53 -05:00
Carol (Nichols || Goulding) 8a1aad812b Make some further edits to #1998 2020-12-09 21:01:59 -05:00
Carol (Nichols || Goulding) 5afb67affe Merge remote-tracking branch 'origin/pr/1998' 2020-12-09 21:00:10 -05:00
Carol (Nichols || Goulding) 322899b375 Re-fix #2516 - Make a new listing for final code of ch 20
I was trying to reuse too much; we don't want the `take(2)` to be part
of the final code, but we do want it to be in the listing for the
example where we shut down gracefully after 2 requests.
2020-12-08 21:30:00 -05:00
Carol (Nichols || Goulding) eb60fedc9c A solution for empty main in lib.rs, I think!
The reasons we needed empty `fn main() {}`s were twofold:

- Avoid confusing people when they click the "expand" button on the code
listing and see the auto-main wrapping
- Avoid failing doctests when running `mdbook test` that don't work when
rustdoc wraps a code listing in main

I think I have a solution that mostly solves these cases.

I don't know why this didn't occur to me before. Here's my current
thinking in case these assumptions turn out to be wrong:

There are a [few things that tell mdbook to disable the
main-wrapping][mdbook], and I hadn't noticed one of them until now: if
you annotate a code block with `noplayground`, it won't add a `main`
around it (and it also won't have the "play" button in the upper right
that runs the block and inserts the result into the page).

So instead of putting an empty `fn main() {}` at the bottom of
src/lib.rs files that doesn't make sense, annotate those listings with
`noplayground`. I don't think anyone will miss the play button anyway
because:

- The play button doesn't run tests, so there wasn't any output for
these examples anyway
- If an example doesn't compile, we have it marked `ignore` so that it
doesn't make the tests fail, and `ignore` also disables the play button,
so there isn't a way to see compiler errors either

In most of these cases, `mdbook test` that runs these as doctests will
still wrap these in main, but the tests still pass.

There are some cases, mostly around modules and using `crate::` that
won't pass as doctests when wrapped in main. For those, I've annotated
them with the [undocumented][] [`test_harness`][] attribute that apparently
I was using at some point and then [stopped using][] and now I've
decided to use again, but maybe send in a PR to rust-lang/rust to
change the name to `no_main` and document it or something. In any case,
that shouldn't affect readers at all.

[mdbook]: https://github.com/rust-lang/mdBook/blob/d0deee90b04068ed949f524bb682a47fa26f2218/src/renderer/html_handlebars/hbs_renderer.rs#L805-L808
[undocumented]: https://github.com/rust-lang/rust/issues/42288#issuecomment-309661382
[`test_harness`]: https://github.com/rust-lang/rust/blob/220352781c2585f0efb07ab0e758b136514de5b8/src/librustdoc/doctest.rs#L252
[stopped using]: https://github.com/rust-lang/book/pull/1233#discussion_r175515585
2020-12-08 21:30:00 -05:00
Carol (Nichols || Goulding) 359895c6b2 Manual regeneration of output at 1.48 2020-12-05 14:18:31 -05:00
Carol (Nichols || Goulding) 4cd410bab6 Update to 1.48 2020-12-05 14:18:30 -05:00
Carol (Nichols || Goulding) 2567c35e84 Update to Rust 1.47 2020-12-05 14:18:30 -05:00
Carol (Nichols || Goulding) 4895996a3f Update to 1.46 2020-12-05 14:18:30 -05:00
Carol (Nichols || Goulding) 2dca6c3e78 Update to 1.45 2020-12-05 14:18:29 -05:00
Carol (Nichols || Goulding) e894f58929 Update to 1.44 2020-12-05 14:18:29 -05:00
Carol (Nichols || Goulding) 63bc4103cc Update to 1.43 2020-12-05 14:18:29 -05:00
Carol (Nichols || Goulding) 6e98805629 Update to 1.42 2020-12-05 14:18:28 -05:00
Carol (Nichols || Goulding) 1ab83e0989 Merge pull request #2509 from ejez/patch-1
Fix typo, regarding privileged ports being up to 1023 instead of 1024
2020-12-04 21:15:04 -05:00
Carol (Nichols || Goulding) 9cfaf8dd39 Merge pull request #2498 from tombusby/patch-1
Change "appendixes" to "appendices" in intro.
2020-12-01 22:11:28 -05:00
Ejez f51282c2c6 Fix typo 2020-11-23 12:00:53 +03:00
Eden Yefet b5ee0a62ca Update ch08-03-hash-maps.md
Original URL 404s.
2020-11-14 21:10:30 +02:00
Tom Busby a8fd17e7f7 Change "appendixes" to "appendices" in intro. 2020-11-10 23:55:34 +01:00
Thandile Nododile 4eef2b2c34 Referencing to Appendix B
Making reference to Appendix B for continuous reading without having to look for Appendix B, this resembles what has been done in the previous sections.
👍
2020-10-20 05:58:11 +02:00
Martin Torp 73a1e3888b clarify description of when ? can be used 2020-10-04 18:09:08 +02:00
Amjad Alsharafi 20e7120656 Edit description of semantic versioning in chapter 2 2020-09-02 12:02:49 +08:00
Amjad Alsharafi 09ea67e613 Fixed the error message of invalid array element access in ch03.2 2020-09-02 11:50:53 +08:00
RustDili 4e6600daa7 Update ppendix-06-translation.md
Turkish translation link added
2020-08-24 12:31:46 +03:00
progrm_jarvis 9c4bf8abd2 Actualize ch19-01 for current unsafe actions 2020-08-20 20:04:03 +03:00
Jahwi 53eaa8cb53 Correct no-listing-10-result-in-tests: Take tests module out of the main function 2020-08-15 12:59:35 +01:00
Jahwi c981c7174a Correct listing 11-10: Take test module out of main function. 2020-08-13 22:38:06 +01:00
Istratov Dmitrii 6ffa36f913 update link to russian translation 2020-08-06 10:50:43 +00:00
Rein van 't Veer 2dd624aab1 Clarify Copy linguistics
A type as *being* "Copy" as an adjective collides with the common sense word "copy" being either a verb or a noun. Something is a copy of, or you copy from something to something else. The documentation should (I feel) reflect this not to confuse readers (as I was). I'm not sure whether the "ˋCopyˋable" semantics is congruent with Rust traits, having no experience with it, but I think it adds to the readability of this section.
2020-08-02 12:51:22 +02:00
Hugh Rundle 52b0d291d2 replace commas with m-dashes to improve readability of chapter 4.1
This commit makes a minor punctuation change to make the sentence clearer to read and less ambiguous.
2020-08-02 20:15:30 +10:00
Rein van 't Veer 2f04f65ace l letter to non-italic
Remove italics to prevent letter "l" to appear as a slash
2020-08-02 10:02:44 +02:00
Ross MacArthur a2e4bbfdfb Update TOML link to official website 2020-07-28 22:39:54 +02:00