Commit Graph
51 Commits
Author SHA1 Message Date
Chris Krycho 96501370c2 Update to Rust 1.82 2024-11-05 15:53:09 -07:00
Chris Krycho e28cd5b13f Set the correct baseline for current Rust version
Unfortunately missed some of this when updating to Rust 1.81
2024-11-04 13:15:19 -07:00
Chris Krycho 6b6b4501f1 Upgrade to Rust 1.81
In addition to the baseline changes, skip over non-directory code where
directories are needed to deal with things like `.DS_Store` files. Also
add a bunch of context on error causes from `std::io::Error` because it
was *impossible* to figure out exactly what the source of those were.
2024-09-11 07:26:31 -06:00
Carol (Nichols || Goulding) 655526a904 Upgrade to Rust 1.79.0 2024-07-05 13:35:06 -04:00
Carol (Nichols || Goulding) 5fd055e6fb Update to Rust 1.78.0 2024-05-22 14:52:49 -04:00
Carol (Nichols || Goulding) 1e09221e31 Update to Rust 1.77.2 2024-05-22 14:52:49 -04:00
Chris Krycho 6196a0ab45 Merge main into nyurik:inlinefmt2 2024-04-19 11:57:29 -06:00
Carol (Nichols || Goulding) 940fb140f5 Update to Rust 1.76 2024-02-19 15:39:35 -05:00
Carol (Nichols || Goulding) 551369f4b1 Update to Rust 1.74 2024-02-19 15:39:35 -05:00
Carol (Nichols || Goulding) e51e1e4457 Update to Rust 1.73 2024-02-19 15:39:35 -05:00
Carol (Nichols || Goulding) c3613dee0c Update to Rust 1.72 2024-02-19 15:39:35 -05:00
Carol (Nichols || Goulding) 25d95a0580 Update to Rust 1.71 2024-02-19 15:39:35 -05:00
Carol (Nichols || Goulding) 44a3076190 Update to Rust 1.70 2024-02-19 15:39:35 -05:00
Carol (Nichols || Goulding) 3db049bb6a Update to Rust 1.68 2024-02-19 15:39:35 -05:00
Yuri Astrakhan f55ac5d8fa Inline all format arguments
The inlined format arguments are a bit easier to understand,
especially for those familiar with the other languages (python, js).
2023-10-30 11:54:36 -04:00
Carol (Nichols || Goulding) d94e03a18a Update to Rust 1.67.1 2023-02-10 11:01:09 -05:00
Carol (Nichols || Goulding) f92027c68a Update to Rust 1.66.1 2023-02-10 10:55:43 -05:00
Carol (Nichols || Goulding) 3f64052c04 Upgrade to Rust 1.65 2022-11-03 22:13:58 -04:00
Carol (Nichols || Goulding) 19c75074d1 Upgrade to Rust 1.64 2022-11-03 22:13:58 -04:00
Carol (Nichols || Goulding) 2fe9eff266 Update to Rust 1.62 2022-07-04 21:17:25 -04:00
Carol (Nichols || Goulding) d71683d0a8 Println captures in chapter 15 2022-06-04 20:48:52 -04:00
Carol (Nichols || Goulding) 4b43eac27b Upgrade to Rust 1.61 2022-06-04 09:38:06 -04:00
Marvin Löbel 3e6f616f63 fix unidiomatic new functions in chapter 15 2022-04-30 10:14:07 -04:00
Carol (Nichols || Goulding) cecf909561 Update to 1.59 2022-03-30 10:15:13 -04:00
Carol (Nichols || Goulding) ab4f04cbe6 Update the edition in all the listings' Cargo.toml 2021-12-26 20:32:41 -05:00
Carol (Nichols || Goulding) 5f9358faeb 1.57 2021-12-05 21:33:16 -05:00
Carol (Nichols || Goulding) 5f2729cdc5 Update to 1.56 2021-12-05 21:33:16 -05:00
Carol (Nichols || Goulding) 126aa9faa8 Update to Rust 1.55 2021-09-16 21:01:38 -04:00
Carol (Nichols || Goulding) e8200d27ed Update to Rust 1.54 2021-07-31 20:15:17 -04:00
Jade 1c4a1ea4bf Remove authors field from all the listing manifests
Since RFC3052 is fully implemented in Cargo and the various Rust
websites, we can set an example by removing the authors field from all
the listings as it has been effectively soft deprecated.

Follow on/related to #2785, which removed the references in the text.
2021-07-27 19:02:14 -07:00
Carol (Nichols || Goulding) 0b942f6be8 Update to Rust 1.53. 2021-07-21 22:03:38 -04:00
Carol (Nichols || Goulding) b31140b9fa Update to 1.51 2021-05-06 20:54:26 -04:00
kangxiaoning 475807042f correct the signature of the deref method 2021-03-21 21:33:10 +08:00
Carol (Nichols || Goulding) 24774070de Update lock files and output 2021-02-17 21:13:47 -05:00
Carol (Nichols || Goulding) db5e8a5105 Update to Rust 1.50 2021-02-12 16:58:20 -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) 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
Homa Wong 1de0dc4b30 fix: matching with 15-18 2020-04-28 19:25:06 -07:00
Homa Wong ed626f9e8d fix: matching with 15-18 2020-04-28 19:23:31 -07:00
Carol (Nichols || Goulding) a2bd349f86 Update to Rust 1.41.0 2020-02-03 10:36:54 -05:00
Carol (Nichols || Goulding) c642b72fc9 Update to Rust 1.40 2020-01-25 21:21:11 -05:00
Carol (Nichols || Goulding) 3c3484974a Update to Rust 1.39 2020-01-25 21:21:04 -05:00
Carol (Nichols || Goulding) 5f4f738b5c Update to Rust 1.38 2020-01-25 21:20:42 -05:00
Carol (Nichols || Goulding) fd3e92042d Commit the changes that rustfmt made to all the listings 2020-01-25 21:20:41 -05:00