From b32b9ae934bcd329c097a15f7c3df58bd972ac55 Mon Sep 17 00:00:00 2001 From: Mark Mansi Date: Wed, 26 Jun 2019 14:26:14 -0500 Subject: [PATCH] fix links --- src/borrow_check/region_inference/constraint_propagation.md | 6 +++--- .../region_inference/placeholders_and_universes.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/borrow_check/region_inference/constraint_propagation.md b/src/borrow_check/region_inference/constraint_propagation.md index 7b9eeb13..daa52393 100644 --- a/src/borrow_check/region_inference/constraint_propagation.md +++ b/src/borrow_check/region_inference/constraint_propagation.md @@ -11,7 +11,7 @@ on one at a time (each of them is fairly independent from the others): - [member constraints][m_c] (`member R_m of [R_c...]`), which arise from impl Trait. [`propagate_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/region_infer/struct.RegionInferenceContext.html#method.propagate_constraints -[m_c]: ./member_constraints.html +[m_c]: ./member_constraints.md In this chapter, we'll explain the "heart" of constraint propagation, covering both liveness and outlives constraints. @@ -29,7 +29,7 @@ given some set of constraints `{C}` and it computes a set of values - For each constraint C: - Update `Values` as needed to satisfy the constraint -[riv]: ../region-inference.html#region-variables +[riv]: ../region_inference.md#region-variables As a simple example, if we have a liveness constraint `R live at E`, then we can apply `Values(R) = Values(R) union {E}` to make the @@ -55,7 +55,7 @@ includes a region R is live at some [point] P. This simply means that the value of R must include the point P. Liveness constraints are computed by the MIR type checker. -[point]: ../../appendix/glossary.html +[point]: ../../appendix/glossary.md A liveness constraint `R live at E` is satisfied if `E` is a member of `Values(R)`. So to "apply" such a constraint to `Values`, we just have diff --git a/src/borrow_check/region_inference/placeholders_and_universes.md b/src/borrow_check/region_inference/placeholders_and_universes.md index e40ee11b..eda8e6ff 100644 --- a/src/borrow_check/region_inference/placeholders_and_universes.md +++ b/src/borrow_check/region_inference/placeholders_and_universes.md @@ -36,7 +36,7 @@ the type of `foo` the type `bar` expects We handle this sort of subtyping by taking the variables that are bound in the supertype and replacing them with -[universally quantified](../appendix/background.html#quantified) +[universally quantified](../../appendix/background.md#quantified) representatives, denoted like `!1` here. We call these regions "placeholder regions" – they represent, basically, "some unknown region". @@ -53,7 +53,7 @@ what we wanted. So let's work through what happens next. To check if two functions are subtypes, we check if their arguments have the desired relationship -(fn arguments are [contravariant](../appendix/background.html#variance), so +(fn arguments are [contravariant](../../appendix/background.md#variance), so we swap the left and right here): ```text @@ -92,7 +92,7 @@ Here, the root universe would consist of the lifetimes `'static` and the same concept to types, in which case the types `Foo` and `T` would be in the root universe (along with other global types, like `i32`). Basically, the root universe contains all the names that -[appear free](../appendix/background.html#free-vs-bound) in the body of `bar`. +[appear free](../../appendix/background.md#free-vs-bound) in the body of `bar`. Now let's extend `bar` a bit by adding a variable `x`: