Skip to content

Commit 3a1d7d0

Browse files
committed
Fix all the links to be relative for mdbook 2
1 parent 371b8df commit 3a1d7d0

18 files changed

+103
-103
lines changed

src/appendix/background.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ and Michael I. Schwartzbach is an incredible resource!
9494
Check out the subtyping chapter from the
9595
[Rust Nomicon](https://doc.rust-lang.org/nomicon/subtyping.html).
9696

97-
See the [variance](./variance.html) chapter of this guide for more info on how
97+
See the [variance](../variance.html) chapter of this guide for more info on how
9898
the type checker handles variance.
9999

100100
<a name="free-vs-bound"></a>

src/appendix/code-index.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ Item | Kind | Short description | Chapter |
2929
`Ty<'tcx>` | struct | This is the internal representation of a type used for type checking | [Type checking] | [src/librustc/ty/mod.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/type.Ty.html)
3030
`TyCtxt<'cx, 'tcx, 'tcx>` | type | The "typing context". This is the central data structure in the compiler. It is the context that you use to perform all manner of queries | [The `ty` modules] | [src/librustc/ty/context.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/struct.TyCtxt.html)
3131

32-
[The HIR]: hir.html
33-
[Identifiers in the HIR]: hir.html#hir-id
34-
[The parser]: the-parser.html
35-
[The Rustc Driver]: rustc-driver.html
36-
[Type checking]: type-checking.html
37-
[The `ty` modules]: ty.html
38-
[Rustdoc]: rustdoc.html
39-
[Emitting Diagnostics]: diag.html
40-
[Macro expansion]: macro-expansion.html
41-
[Name resolution]: name-resolution.html
42-
[Parameter Environment]: param_env.html
43-
[Trait Solving: Goals and Clauses]: traits/goals-and-clauses.html#domain-goals
44-
[Trait Solving: Lowering impls]: traits/lowering-rules.html#lowering-impls
32+
[The HIR]: ../hir.html
33+
[Identifiers in the HIR]: ../hir.html#hir-id
34+
[The parser]: ../the-parser.html
35+
[The Rustc Driver]: ../rustc-driver.html
36+
[Type checking]: ../type-checking.html
37+
[The `ty` modules]: ../ty.html
38+
[Rustdoc]: ../rustdoc.html
39+
[Emitting Diagnostics]: ../diag.html
40+
[Macro expansion]: ../macro-expansion.html
41+
[Name resolution]: ../name-resolution.html
42+
[Parameter Environment]: ../param_env.html
43+
[Trait Solving: Goals and Clauses]: ../traits/goals-and-clauses.html#domain-goals
44+
[Trait Solving: Lowering impls]: ../traits/lowering-rules.html#lowering-impls

src/appendix/glossary.md

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

src/borrow_check/region_inference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The MIR-based region analysis consists of two major functions:
3535
- More details to come, though the [NLL RFC] also includes fairly thorough
3636
(and hopefully readable) coverage.
3737

38-
[fvb]: appendix/background.html#free-vs-bound
38+
[fvb]: ../appendix/background.html#free-vs-bound
3939
[NLL RFC]: http://rust-lang.github.io/rfcs/2094-nll.html
4040

4141
## Universal regions
@@ -131,7 +131,7 @@ the type of `foo` the type `bar` expects
131131
We handle this sort of subtyping by taking the variables that are
132132
bound in the supertype and **skolemizing** them: this means that we
133133
replace them with
134-
[universally quantified](appendix/background.html#quantified)
134+
[universally quantified](../appendix/background.html#quantified)
135135
representatives, written like `!1`. We call these regions "skolemized
136136
regions" – they represent, basically, "some unknown region".
137137

@@ -148,7 +148,7 @@ what we wanted.
148148

149149
So let's work through what happens next. To check if two functions are
150150
subtypes, we check if their arguments have the desired relationship
151-
(fn arguments are [contravariant](./appendix/background.html#variance), so
151+
(fn arguments are [contravariant](../appendix/background.html#variance), so
152152
we swap the left and right here):
153153

154154
```text
@@ -187,7 +187,7 @@ Here, the root universe would consist of the lifetimes `'static` and
187187
the same concept to types, in which case the types `Foo` and `T` would
188188
be in the root universe (along with other global types, like `i32`).
189189
Basically, the root universe contains all the names that
190-
[appear free](./appendix/background.html#free-vs-bound) in the body of `bar`.
190+
[appear free](../appendix/background.html#free-vs-bound) in the body of `bar`.
191191

192192
Now let's extend `bar` a bit by adding a variable `x`:
193193

src/mir/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The MIR (Mid-level IR)
22

33
MIR is Rust's _Mid-level Intermediate Representation_. It is
4-
constructed from [HIR](./hir.html). MIR was introduced in
4+
constructed from [HIR](../hir.html). MIR was introduced in
55
[RFC 1211]. It is a radically simplified form of Rust that is used for
66
certain flow-sensitive safety checks – notably the borrow checker! –
77
and also for optimization and code generation.
@@ -26,7 +26,7 @@ Some of the key characteristics of MIR are:
2626
- It does not have nested expressions.
2727
- All types in MIR are fully explicit.
2828

29-
[cfg]: ./appendix/background.html#cfg
29+
[cfg]: ../appendix/background.html#cfg
3030

3131
## Key MIR vocabulary
3232

@@ -244,4 +244,4 @@ but [you can read about those below](#promoted)).
244244
[mir]: https://github.com/rust-lang/rust/tree/master/src/librustc/mir
245245
[mirmanip]: https://github.com/rust-lang/rust/tree/master/src/librustc_mir
246246
[mir]: https://github.com/rust-lang/rust/tree/master/src/librustc/mir
247-
[newtype'd]: appendix/glossary.html
247+
[newtype'd]: ../appendix/glossary.html

src/mir/passes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ then `mir_const_qualif(D)` would succeed if it came before
156156
`mir_validated(D)`, but fail otherwise. Therefore, `mir_validated(D)`
157157
will **force** `mir_const_qualif` before it actually steals, thus
158158
ensuring that the reads have already happened (remember that
159-
[queries are memoized](./query.html), so executing a query twice
159+
[queries are memoized](../query.html), so executing a query twice
160160
simply loads from a cache the second time):
161161

162162
```text
@@ -174,4 +174,4 @@ alternatives in [rust-lang/rust#41710].
174174
[rust-lang/rust#41710]: https://github.com/rust-lang/rust/issues/41710
175175
[mirtransform]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/
176176
[`NoLandingPads`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/no_landing_pads/struct.NoLandingPads.html
177-
[MIR visitor]: mir/visitor.html
177+
[MIR visitor]: ./visitor.html

src/tests/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ by the build system (`x.py test`). The main test harness for testing
55
the compiler itself is a tool called compiletest (sources in the
66
[`src/tools/compiletest`]). This section gives a brief overview of how
77
the testing framework is setup, and then gets into some of the details
8-
on [how to run tests](./tests/running.html#ui) as well as
9-
[how to add new tests](./tests/adding.html).
8+
on [how to run tests](./running.html#ui) as well as
9+
[how to add new tests](./adding.html).
1010

1111
[`src/tools/compiletest`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest
1212

@@ -24,7 +24,7 @@ Here is a brief summary of the test suites as of this writing and what
2424
they mean. In some cases, the test suites are linked to parts of the manual
2525
that give more details.
2626

27-
- [`ui`](./tests/adding.html#ui) – tests that check the exact
27+
- [`ui`](./adding.html#ui) – tests that check the exact
2828
stdout/stderr from compilation and/or running the test
2929
- `run-pass` – tests that are expected to compile and execute
3030
successfully (no panics)
@@ -59,7 +59,7 @@ including:
5959
- **Tidy** – This is a custom tool used for validating source code
6060
style and formatting conventions, such as rejecting long lines.
6161
There is more information in the
62-
[section on coding conventions](./conventions.html#formatting).
62+
[section on coding conventions](../conventions.html#formatting).
6363

6464
Example: `./x.py test src/tools/tidy`
6565

src/traits/associated-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type can be referenced by the user using an **associated type
1717
projection** like `<Option<u32> as IntoIterator>::Item`. (Often,
1818
though, people will use the shorthand syntax `T::Item` – presently,
1919
that syntax is expanded during
20-
["type collection"](./type-checking.html) into the explicit form,
20+
["type collection"](../type-checking.html) into the explicit form,
2121
though that is something we may want to change in the future.)
2222

2323
[intoiter-item]: https://doc.rust-lang.org/nightly/core/iter/trait.IntoIterator.html#associatedtype.Item
@@ -130,7 +130,7 @@ any given associated item.
130130

131131
Now we are ready to discuss how associated type equality integrates
132132
with unification. As described in the
133-
[type inference](./type-inference.html) section, unification is
133+
[type inference](../type-inference.html) section, unification is
134134
basically a procedure with a signature like this:
135135

136136
```text

src/traits/caching.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ On the other hand, if there is no hit, we need to go through the [selection
2424
process] from scratch. Suppose, we come to the conclusion that the only
2525
possible impl is this one, with def-id 22:
2626

27-
[selection process]: ./traits/resolution.html#selection
27+
[selection process]: ./resolution.html#selection
2828

2929
```rust,ignore
3030
impl Foo<isize> for usize { ... } // Impl #22
@@ -34,7 +34,7 @@ We would then record in the cache `usize : Foo<$0> => ImplCandidate(22)`. Next
3434
we would [confirm] `ImplCandidate(22)`, which would (as a side-effect) unify
3535
`$t` with `isize`.
3636

37-
[confirm]: ./traits/resolution.html#confirmation
37+
[confirm]: ./resolution.html#confirmation
3838

3939
Now, at some later time, we might come along and see a `usize :
4040
Foo<$u>`. When skolemized, this would yield `usize : Foo<$0>`, just as
@@ -61,7 +61,7 @@ to be pretty clearly safe and also still retains a very high hit rate
6161
**TODO**: it looks like `pick_candidate_cache` no longer exists. In
6262
general, is this section still accurate at all?
6363

64-
[`ParamEnv`]: ./param_env.html
65-
[`tcx`]: ./ty.html
64+
[`ParamEnv`]: ../param_env.html
65+
[`tcx`]: ../ty.html
6666
[#18290]: https://github.com/rust-lang/rust/issues/18290
6767
[#22019]: https://github.com/rust-lang/rust/issues/22019

src/traits/canonical-queries.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
The "start" of the trait system is the **canonical query** (these are
44
both queries in the more general sense of the word – something you
55
would like to know the answer to – and in the
6-
[rustc-specific sense](./query.html)). The idea is that the type
6+
[rustc-specific sense](../query.html)). The idea is that the type
77
checker or other parts of the system, may in the course of doing their
88
thing want to know whether some trait is implemented for some type
99
(e.g., is `u32: Debug` true?). Or they may want to
10-
[normalize some associated type](./traits/associated-types.html).
10+
[normalize some associated type](./associated-types.html).
1111

1212
This section covers queries at a fairly high level of abstraction. The
1313
subsections look a bit more closely at how these ideas are implemented
@@ -106,7 +106,7 @@ value for a type variable, that means that this is the **only possible
106106
instantiation** that you could use, given the current set of impls and
107107
where-clauses, that would be provable. (Internally within the solver,
108108
though, they can potentially enumerate all possible answers. See
109-
[the description of the SLG solver](./traits/slg.html) for details.)
109+
[the description of the SLG solver](./slg.html) for details.)
110110

111111
The response to a trait query in rustc is typically a
112112
`Result<QueryResult<T>, NoSolution>` (where the `T` will vary a bit
@@ -132,7 +132,7 @@ we did find. It consists of four parts:
132132
- **Region constraints:** these are relations that must hold between
133133
the lifetimes that you supplied as inputs. We'll ignore these here,
134134
but see the
135-
[section on handling regions in traits](./traits/regions.html) for
135+
[section on handling regions in traits](./regions.html) for
136136
more details.
137137
- **Value:** The query result also comes with a value of type `T`. For
138138
some specialized queries – like normalizing associated types –
@@ -219,7 +219,7 @@ As a result of this assignment, the type of `u` is forced to be
219219
`Option<Vec<?V>>`, where `?V` represents the element type of the
220220
vector. This in turn implies that `?U` is [unified] to `Vec<?V>`.
221221

222-
[unified]: ./type-checking.html
222+
[unified]: ../type-checking.html
223223

224224
Let's suppose that the type checker decides to revisit the
225225
"as-yet-unproven" trait obligation we saw before, `Vec<?T>:

0 commit comments

Comments
 (0)