Skip to content

Commit 45e2a03

Browse files
committed
Fix links.
1 parent 5afa182 commit 45e2a03

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

src/traits/canonical-queries.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ would like to know the answer to – and in the
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](./associated-types.html).
10+
normalize some associated type.
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
@@ -104,9 +104,7 @@ trying to enumerate **all possible** answers for you, they are looking
104104
for an **unambiguous** answer. In particular, when they tell you the
105105
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
107-
where-clauses, that would be provable. (Internally within the solver,
108-
though, they can potentially enumerate all possible answers. See
109-
[the description of the SLG solver](./slg.html) for details.)
107+
where-clauses, that would be provable.
110108

111109
The response to a trait query in rustc is typically a
112110
`Result<QueryResult<T>, NoSolution>` (where the `T` will vary a bit
@@ -130,10 +128,7 @@ we did find. It consists of four parts:
130128
- As we'll see in the example below, we can get back var values even
131129
for `Ambiguous` cases.
132130
- **Region constraints:** these are relations that must hold between
133-
the lifetimes that you supplied as inputs. We'll ignore these here,
134-
but see the
135-
[section on handling regions in traits](./regions.html) for
136-
more details.
131+
the lifetimes that you supplied as inputs. We'll ignore these here.
137132
- **Value:** The query result also comes with a value of type `T`. For
138133
some specialized queries – like normalizing associated types –
139134
this is used to carry back an extra result, but it's often just

src/traits/goals-and-clauses.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ In terms of code, these types are defined in
4141
[`librustc_middle/traits/mod.rs`][traits_mod] in rustc, and in
4242
[`chalk-ir/src/lib.rs`][chalk_ir] in chalk.
4343

44-
[pphhf]: ./bibliography.html#pphhf
44+
[pphhf]: https://rust-lang.github.io/chalk/book/bibliography.html#pphhf
4545
[traits_mod]: https://github.com/rust-lang/rust/blob/master/src/librustc_middle/traits/mod.rs
4646
[chalk_ir]: https://github.com/rust-lang/chalk/blob/master/chalk-ir/src/lib.rs
4747

@@ -118,20 +118,20 @@ e.g. `ProjectionEq<T as Iterator>::Item = u8`
118118

119119
The given associated type `Projection` is equal to `Type`; this can be proved
120120
with either normalization or using placeholder associated types. See
121-
[the section on associated types](./associated-types.html).
121+
[the section on associated types in Chalk Book][at].
122122

123123
#### Normalize(Projection -> Type)
124124
e.g. `ProjectionEq<T as Iterator>::Item -> u8`
125125

126126
The given associated type `Projection` can be [normalized][n] to `Type`.
127127

128128
As discussed in [the section on associated
129-
types](./associated-types.html), `Normalize` implies `ProjectionEq`,
129+
types in Chalk Book][at], `Normalize` implies `ProjectionEq`,
130130
but not vice versa. In general, proving `Normalize(<T as Trait>::Item -> U)`
131131
also requires proving `Implemented(T: Trait)`.
132132

133-
[n]: ./associated-types.html#normalize
134-
[at]: ./associated-types.html
133+
[n]: https://rust-lang.github.io/chalk/book/clauses/type_equality.html#normalize
134+
[at]: https://rust-lang.github.io/chalk/book/clauses/type_equality.html
135135

136136
#### FromEnv(TraitRef)
137137
e.g. `FromEnv(Self: Add<i32>)`
@@ -260,7 +260,7 @@ In addition to auto traits, `WellFormed` predicates are co-inductive.
260260
These are used to achieve a similar "enumerate all the cases" pattern,
261261
as described in the section on [implied bounds].
262262

263-
[implied bounds]: ./lowering-rules.html#implied-bounds
263+
[implied bounds]: https://rust-lang.github.io/chalk/book/clauses/implied_bounds.html#implied-bounds
264264

265265
## Incomplete chapter
266266

src/traits/lowering-to-logic.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ the body". But it's nice to know the proper name, because there is a
168168
lot of work describing how to efficiently handle FOHH clauses; see for
169169
example Gopalan Nadathur's excellent
170170
["A Proof Procedure for the Logic of Hereditary Harrop Formulas"][pphhf]
171-
in [the bibliography].
171+
in [the bibliography of Chalk Book].
172172

173-
[the bibliography]: ./bibliography.html
174-
[pphhf]: ./bibliography.html#pphhf
173+
[the bibliography]: https://rust-lang.github.io/chalk/book/bibliography.html
174+
[pphhf]: https://rust-lang.github.io/chalk/book/bibliography.html#pphhf
175175

176176
It turns out that supporting FOHH is not really all that hard. And
177177
once we are able to do that, we can easily describe the type-checking

0 commit comments

Comments
 (0)