Inspired by #1079. I used this command to find these typos:
rg --multiline --pcre2 '\b([a-zA-Z]+) \1\b' src -tmd
There were a couple false positives of the form "that that" meaning
"that it" or "that this".
Document how to use WPA to profile rustc and what the normal workflow
should be for investigating bootstrap memory usage issues.
Co-authored-by: Ryan Levick <ryan.levick@gmail.com>
The `--emit=llvm-ir` emits an optimized LLVM IR. For optimized builds it will be
highly inaccurate estimate of the amount IR generated initially. While the
inaccuracy can be somewhat reduce after disabling the optimization, that in turn
has other unintended consequences, since opt-level controls the emission of
lifetime markers, sharing of generics between crates, instantiation of inline
functions, etc.
Use `-Csave-temps` and `no-opt` bitcode as a basis for more accurate estimate of
initial work handed of to the LLVM.
* Rename "The walking tour of rustdoc" to "Rustdoc overview",
which I think is a more accurate name
* Use same name in sidebar TOC as in chapter text
* Make links between the two chapters prominent
* Convert a few `.html` links to `.md`
Probably we should just merge the chapters, but leaving that for later.
The biggest change was updating the list of rustdoc passes. Several new
ones have been added since that documentation was written, so I added
those, and I also sorted the list so it is roughly alphabetical (except
for the part for the `strip-*` passes, which I left in the same order
since one of the list items has two passes so there's no "correct"
order).
I realized that the format I had been previously using for date-checks
(as of January 2021 <!-- date: 2021-01 -->)
left a space before the closing parenthesis in the rendered output,
which looks weird.
I could fix this by removing the space between `2021` and `<!-- ...`,
but that looks weird in the source. So I ended up deciding on changing
it to
(as of <!-- date: 2021-01 --> January 2021)
This tool looks for HTML comments like `<!-- date: 2021-01 -->` in each
Markdown source file and compiles a list of dates that are older than
six months. It then opens an issue with that list, with checkboxes for
each file and date. Note that it will only open an issue if there was at
least one date older than six months; it does nothing if the list is
empty.
This tool is automatically run monthly in a GitHub Actions workflow.
I have tested the tool on a private repo and confirmed that it works.
* Move 'force-unstable-if-unmarked' to the bootstrapping chapter
* Document how to stabilize a library feature
Note that features can't be stabilized until they go through FCP and
that FCP happens on the tracking issue, not the PR.
* Fix wrong glob
By default `**` behaves the same as two `*` side by side, i.e. it only
globs file paths, not directories. `shopt -s globstar` needs to be set
for it to mean a directory. I didn't notice this before now because
`globstar` is set by default in interactive mode, but not otherwise.
`download-ci-llvm` is available and enabled by default for all tier 1
platforms, so there is no need to change it. Using system LLVM over CI
llvm is still supported, but is not recommended. Building LLVM from
source is still supported.
This also notes that you need to explicitly disable downloading LLVM
when updating the submodule.