Commit Graph

67 Commits

Author SHA1 Message Date
Carol (Nichols || Goulding) 19c40bfd2d Add a rustc hash to spellcheck dictionary 2024-02-19 15:39:35 -05:00
Carol (Nichols || Goulding) f2a78f64b6
Change CamelCase to UpperCamelCase
Brings the terminology in line with the rest of the project, see
<https://github.com/rust-lang/rfcs/pull/2389>.

Connects to #2194.
2023-01-23 13:19:32 -05:00
Carol (Nichols || Goulding) 0c6674de0c Add unittests to the allowed words 2022-10-20 16:39:55 -04:00
Carol (Nichols || Goulding) b75254dbb0
Propagate edits of ch1 to src 2022-06-13 16:54:37 -04:00
Carol (Nichols || Goulding) 5df6909c57
Propagate edits to chapter 20 to src 2022-06-07 21:46:10 -04:00
Carol (Nichols || Goulding) 39f263f00c
Propagate ch14 tech review changes to src 2022-06-04 10:14:33 -04:00
Carol (Nichols || Goulding) e44d600dd1
Propagate ch12 tech review edits to src 2022-06-03 21:10:24 -04:00
Carol (Nichols || Goulding) 08965d76e1
New dictionary entries 2022-05-30 21:09:24 -04:00
Carol (Nichols || Goulding) c77d7a1279
Propagate chapter 7 edits to src 2022-05-20 22:06:38 -04:00
Carol (Nichols || Goulding) b723bcd9ec
Fix spelling mistakes, update dictionary 2022-05-11 21:23:48 -04:00
Carol (Nichols || Goulding) 8fa865b498
Add words to dictionary 2022-04-30 14:14:27 -04:00
Carol (Nichols || Goulding) 5e58b9cc3f
Start of better Fn traits explanation 2022-04-23 13:25:50 -04:00
Carol (Nichols || Goulding) ce4da5ccbf
Start of a new closure example 2022-04-21 10:33:03 -04:00
Carol (Nichols || Goulding) c99c03c659 Make fixes recommended by shellcheck 2022-01-03 13:18:46 -05:00
Carol (Nichols || Goulding) cf272254b8 SIGH add all the words to the dictionary that were missed while spellcheck was broken 2022-01-01 21:47:17 -05:00
Carol (Nichols || Goulding) 910714b472 Remove test_harness from the dictionary 2022-01-01 21:47:17 -05:00
Carol (Nichols || Goulding) 09e687ec7a set -eu in all bash scripts 2022-01-01 21:47:17 -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]: d0deee90b0/src/renderer/html_handlebars/hbs_renderer.rs (L805-L808)
[undocumented]: https://github.com/rust-lang/rust/issues/42288#issuecomment-309661382
[`test_harness`]: 220352781c/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
Ryan Willis 855aabd099 Update ch12-05 PowerShell note 2020-06-02 17:04:02 -07:00
Steve Klabnik e2108334d4 We don't need build.sh anymore 2020-05-22 23:48:48 -05:00
Steve Klabnik 4a49a4b7d9 Port to GitHub Actions
Most of the Rust project has moved over to Actions, but we were still on
Travis. This sets up the needed Actions for us.
2020-05-22 23:36:19 -05:00
Montgomery Edwards⁴⁴⁸ 297534d172
Add https, proto, and tlsv to dictionary.txt 2020-04-12 23:21:18 -05:00
Eric Huss 6af7cbcd08 Use rust-lang/rust linkchecker on CI. 2020-02-21 09:23:10 -08:00
Carol (Nichols || Goulding) f44367a4ca
Add words to dictionary 2020-02-03 10:49:43 -05:00
Carol (Nichols || Goulding) 5c71aac643
Extract code listings to separate files 2020-01-25 21:20:38 -05:00
Steve Klabnik 120e76a0cc
Merge pull request #1906 from crlf0710/remove_fnbox
[Rust 1.35] Remove FnBox and use builtin impl FnOnce for Box<FnOnce()> instead.
2019-11-13 09:09:51 -08:00
Eric Huss cf633ee5b9 Fix tidy error.
Upstream tidy doesn't like the whitespace in `ci/build.sh` (no tabs,
too many newlines).
2019-10-01 08:48:26 -07:00
Carol (Nichols || Goulding) 627f2678d2
ci: validate that all used references are defined (#2032)
ci: validate that all used references are defined
2019-09-30 20:38:12 -04:00
Carol (Nichols || Goulding) 5b2740e64a
Remove the check for unstable features
We don't use nightly Rust anymore, nor do we try to land docs for
features while they're still unstable, so this check is no longer
needed. The tests will just fail if we try to use a feature flag in code
listings.
2019-09-30 20:29:07 -04:00
Paul Emmerich 38ceba56a8 ci: validate that all used references are defined
this will catch issues like https://github.com/rust-lang/book/issues/2010
2019-07-14 22:25:04 +02:00
Carol (Nichols || Goulding) b56bc84009
Add vert to dictionary 2019-06-15 15:19:03 -04:00
Carol (Nichols || Goulding) 3c3220613d
Fix spellingz 2019-04-11 15:40:56 -04:00
CrLF0710 37a17ef40c Remove FnBox and use builtin impl FnOnce for Box<FnOnce()> instead. 2019-04-10 11:05:03 +08:00
Carol (Nichols || Goulding) 0de4a7d66a
haha teach the dictionary steve's name
apparently nichols is fine????
2019-03-21 12:17:56 -04:00
Carol (Nichols || Goulding) 26bc1b2e7b
spellingz 2019-03-08 20:36:03 -05:00
Carol (Nichols || Goulding) d83f107a88
spellingz 2019-03-02 08:00:40 -05:00
Carol (Nichols || Goulding) 80cf2b037f
spellingz 2019-02-18 20:50:12 -05:00
Carol (Nichols || Goulding) 770ffcabcb
moar spellingz 2019-01-29 20:43:36 -05:00
Carol (Nichols || Goulding) c70362845c
fix spellingz 2019-01-29 20:21:26 -05:00
Alexander Regueiro d1b71d1c8e Removed copyright notices & made cosmetic improvements. 2019-01-13 03:29:45 +00:00
Carol (Nichols || Goulding) e52f6c95fa
Add word to dictionary 2019-01-03 21:42:43 -05:00
Carol (Nichols || Goulding) 3ef02e197c
Update dictionary 2019-01-02 11:05:53 -05:00
Carol (Nichols || Goulding) 7740400fec
Fix spelling mistakes that got in while CI spellchecking was broke :P 2018-12-17 08:31:35 -05:00
Carol (Nichols || Goulding) afda93783c
Add words to dictionary 2018-12-17 08:31:35 -05:00
Carol (Nichols || Goulding) a99b4f4347
Remove fancy quotes from dictionary
aspell on travis seems to be fine with these, but my local aspell is
sad about them and we have non-fancy quotes elsewhere in here sooo...
2018-12-17 08:31:35 -05:00
Carol (Nichols || Goulding) a25d1125f2
Fix default dictionary file paths 2018-12-17 08:31:35 -05:00
Carol (Nichols || Goulding) e7d52b93ce
Don't create a dictionary in CI; error if it's not found 2018-12-17 08:31:35 -05:00
Steve Klabnik 1fedfc4b96 move the book to the top level 2018-11-20 13:45:05 -05:00
Dale Wijnand 6f1b4c2b9c
Dedup dictionary.txt
Use the second-edition version as it has some recent additions.
2018-05-04 15:43:59 +01:00
Dale Wijnand a18d6148d3
Dedup spellcheck.sh
Fortunately they were still identical.
2018-05-04 15:38:58 +01:00