Skip to content

Commit 6e91f8d

Browse files
Nashenas88mark-i-m
authored andcommitted
Add ids to all glossary items, make existing glossary links point to glossary, add links for def id in query.md
1 parent 14a08a3 commit 6e91f8d

File tree

9 files changed

+90
-89
lines changed

9 files changed

+90
-89
lines changed

src/appendix/glossary.md

Lines changed: 79 additions & 79 deletions
Large diffs are not rendered by default.

src/backend/monomorph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The monomorphization collector is run just before MIR lowering and codegen.
5353
[`rustc_codegen_ssa::base::codegen_crate`][codegen1] calls the
5454
[`collect_and_partition_mono_items`][mono] query, which does monomorphization
5555
collection and then partitions them into [codegen
56-
units](../appendix/glossary.md).
56+
units](../appendix/glossary.md#codegen-unit).
5757

5858
[mono]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/monomorphize/partitioning/fn.collect_and_partition_mono_items.html
5959
[codegen1]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/base/fn.codegen_crate.html

src/borrow_check.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ the [`mir_borrowck`] query.
3737
we will modify this copy in place to modify the types and things to
3838
include references to the new regions that we are computing.
3939
- We then invoke [`replace_regions_in_mir`] to modify our local MIR.
40-
Among other things, this function will replace all of the [regions](./appendix/glossary.md) in
41-
the MIR with fresh [inference variables](./appendix/glossary.md).
40+
Among other things, this function will replace all of the [regions](./appendix/glossary.md#region) in
41+
the MIR with fresh [inference variables](./appendix/glossary.md#inf-var).
4242
- Next, we perform a number of
4343
[dataflow analyses](./appendix/background.md#dataflow) that
4444
compute what data is moved and when.

src/borrow_check/region_inference/constraint_propagation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ includes a region R is live at some [point] P. This simply means that
5555
the value of R must include the point P. Liveness constraints are
5656
computed by the MIR type checker.
5757

58-
[point]: ../../appendix/glossary.md
58+
[point]: ../../appendix/glossary.md#point
5959

6060
A liveness constraint `R live at E` is satisfied if `E` is a member of
6161
`Values(R)`. So to "apply" such a constraint to `Values`, we just have

src/building/suggested.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ the MIR).
5353

5454
**The TL;DR is that you might get weird behavior from a compile when
5555
using `--keep-stage 1`** -- for example, strange
56-
[ICEs](../appendix/glossary.html) or other panics. In that case, you
56+
[ICEs](../appendix/glossary.html#ice) or other panics. In that case, you
5757
should simply remove the `--keep-stage 1` from the command and
5858
rebuild. That ought to fix the problem.
5959

src/mir/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,4 +256,4 @@ but [you can read about those below](#promoted)).
256256
[mir]: https://github.com/rust-lang/rust/tree/master/src/librustc_middle/mir
257257
[mirmanip]: https://github.com/rust-lang/rust/tree/master/src/librustc_mir
258258
[mir]: https://github.com/rust-lang/rust/tree/master/src/librustc_middle/mir
259-
[newtype'd]: ../appendix/glossary.html
259+
[newtype'd]: ../appendix/glossary.html#newtype

src/mir/optimizations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ effective; we can optimize the generic version, so all of the monomorphizations
99
are cheaper!
1010

1111
[mir]: https://rustc-dev-guide.rust-lang.org/mir/index.html
12-
[monomorph]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html?highlight=monomorphize#appendix-c-glossary
12+
[monomorph]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html#mono
1313

1414
MIR optimizations run after borrow checking. We run a series of optimization
1515
passes over the MIR to improve it. Some passes are required to run on all code,
@@ -23,7 +23,7 @@ optimizes it, and returns the improved MIR.
2323

2424
[optmir]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/fn.optimized_mir.html
2525
[query]: https://rustc-dev-guide.rust-lang.org/query.html
26-
[defid]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html?highlight=DefId#appendix-c-glossary
26+
[defid]: https://rustc-dev-guide.rust-lang.org/appendix/glossary.html#def-id
2727
[steal]: https://rustc-dev-guide.rust-lang.org/mir/passes.html?highlight=steal#stealing
2828

2929
## Defining optimization passes

src/query.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ setup to a "demand-driven" system. **The Compiler Query System is the
66
key to our new demand-driven organization.** The idea is pretty
77
simple. You have various queries that compute things about the input
88
– for example, there is a query called `type_of(def_id)` that, given
9-
the def-id of some item, will compute the type of that item and return
9+
the [def-id] of some item, will compute the type of that item and return
1010
it to you.
1111

12+
[def-id]: appendix/glossary.md#def-id
1213
[hl]: high-level-overview.html
1314

1415
Query execution is **memoized** – so the first time you invoke a

src/traits/hrtb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ subtyping, we recommend you read the paper). There are a few parts:
4141
3. Check for _placeholder leaks_.
4242

4343
[hrsubtype]: ./hrtb.md
44-
[placeholder]: ../appendix/glossary.html#appendix-c-glossary
44+
[placeholder]: ../appendix/glossary.html#placeholder
4545
[paper by SPJ]: http://research.microsoft.com/en-us/um/people/simonpj/papers/higher-rank/
4646

4747
So let's work through our example.

0 commit comments

Comments
 (0)