Skip to content

Commit 8047e19

Browse files
authored
Fix broken links related to rustc_borrowck (rust-lang#1259)
* Fix broken links in region_inference.md * Fix broken links in lifetime_parameters.md
1 parent e1babf5 commit 8047e19

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

Diff for: src/borrow_check/region_inference.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The MIR-based region checking code is located in [the `rustc_mir::borrow_check`
66
module][nll].
77

8-
[nll]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/index.html
8+
[nll]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/index.html
99

1010
The MIR-based region analysis consists of two major functions:
1111

@@ -38,10 +38,10 @@ The MIR-based region analysis consists of two major functions:
3838

3939
[cp]: ./region_inference/constraint_propagation.md
4040
[fvb]: ../appendix/background.md#free-vs-bound
41-
[`replace_regions_in_mir`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/fn.replace_regions_in_mir.html
42-
[`compute_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/fn.compute_regions.html
43-
[`RegionInferenceContext`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html
44-
[`solve`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#method.solve
41+
[`replace_regions_in_mir`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/nll/fn.replace_regions_in_mir.html
42+
[`compute_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/nll/fn.compute_regions.html
43+
[`RegionInferenceContext`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html
44+
[`solve`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#method.solve
4545
[NLL RFC]: https://rust-lang.github.io/rfcs/2094-nll.html
4646
[MIR type checker]: ./type_check.md
4747

@@ -68,7 +68,7 @@ the moment.
6868

6969
TODO: write about _how_ these regions are computed.
7070

71-
[`UniversalRegions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/universal_regions/struct.UniversalRegions.html
71+
[`UniversalRegions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/universal_regions/struct.UniversalRegions.html
7272

7373
<a name="region-variables"></a>
7474

@@ -115,7 +115,7 @@ common sorts of constraints are:
115115
2. Liveness constraints. Each region needs to be live at points where it can be
116116
used. These constraints are collected by [`generate_constraints`].
117117

118-
[`generate_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/constraint_generation/fn.generate_constraints.html
118+
[`generate_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/constraint_generation/fn.generate_constraints.html
119119

120120
## Inference Overview
121121

@@ -219,13 +219,13 @@ Here are some of the fields of the struct:
219219
- [`closure_bounds_mapping`]: used for propagating region constraints from
220220
closures back out to the creator of the closure.
221221

222-
[`constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#structfield.constraints
223-
[`liveness_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#structfield.liveness_constraints
222+
[`constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#structfield.constraints
223+
[`liveness_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#structfield.liveness_constraints
224224
[`location`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Location.html
225-
[`universal_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#structfield.universal_regions
226-
[`universal_region_relations`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#structfield.universal_region_relations
227-
[`type_tests`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#structfield.type_tests
228-
[`closure_bounds_mapping`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#structfield.closure_bounds_mapping
225+
[`universal_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#structfield.universal_regions
226+
[`universal_region_relations`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#structfield.universal_region_relations
227+
[`type_tests`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#structfield.type_tests
228+
[`closure_bounds_mapping`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#structfield.closure_bounds_mapping
229229

230230
TODO: should we discuss any of the others fields? What about the SCCs?
231231

@@ -234,6 +234,6 @@ inference. This is done by calling the [`solve`] method on the context. This
234234
is where we call [`propagate_constraints`] and then check the resulting type
235235
tests and universal regions, as discussed above.
236236

237-
[`propagate_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#method.propagate_constraints
238-
[`check_type_tests`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#method.check_type_tests
239-
[`check_universal_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/region_infer/struct.RegionInferenceContext.html#method.check_universal_regions
237+
[`propagate_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#method.propagate_constraints
238+
[`check_type_tests`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#method.check_type_tests
239+
[`check_universal_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#method.check_universal_regions

Diff for: src/borrow_check/region_inference/lifetime_parameters.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ relationships to one another. So if you have e.g. `where 'a: 'b`, then
3131
the [`UniversalRegionRelations`] struct would track that `'a: 'b` is
3232
known to hold (which could be tested with the [`outlives`] function.
3333

34-
[`UniversalRegions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_borrowck/universal_regions/struct.UniversalRegions.html
35-
[`UniversalRegionRelations`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_borrowck/type_check/free_region_relations/struct.UniversalRegionRelations.html
36-
[`outlives`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_borrowck/type_check/free_region_relations/struct.UniversalRegionRelations.html#method.outlives
34+
[`UniversalRegions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/universal_regions/struct.UniversalRegions.html
35+
[`UniversalRegionRelations`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/type_check/free_region_relations/struct.UniversalRegionRelations.html
36+
[`outlives`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/type_check/free_region_relations/struct.UniversalRegionRelations.html#method.outlives
3737

3838
## Everything is a region variable
3939

@@ -58,7 +58,7 @@ type). These subdivisions are not important for the topics discussed
5858
here, but become important when we consider [closure constraint
5959
propagation](./closure_constraints.html), so we discuss them there.
6060

61-
[`RegionClassification`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_borrowck/universal_regions/enum.RegionClassification.html#variant.Local
61+
[`RegionClassification`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/universal_regions/enum.RegionClassification.html#variant.Local
6262

6363
## Universal lifetimes as the elements of a region's value
6464

@@ -88,7 +88,7 @@ liveness constraint (i.e., `'a` must extend until the end of
8888
itself). In the code, these liveness constraints are setup in
8989
[`init_free_and_bound_regions`].
9090

91-
[`init_free_and_bound_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_borrowck/region_infer/struct.RegionInferenceContext.html#method.init_free_and_bound_regions
91+
[`init_free_and_bound_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#method.init_free_and_bound_regions
9292

9393
## Propagating outlives constraints for universal regions
9494

@@ -124,4 +124,4 @@ not, as in our example, that is an error. This check is done in the
124124
universal regions, inspects their final value, and tests against the
125125
declared [`UniversalRegionRelations`].
126126

127-
[`check_universal_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_borrowck/region_infer/struct.RegionInferenceContext.html#method.check_universal_regions
127+
[`check_universal_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/region_infer/struct.RegionInferenceContext.html#method.check_universal_regions

0 commit comments

Comments
 (0)