Minor fix in borrow_check

Fixes as follows:

- fixes spelling
- removes unnecessary white spaces and blank lines
This commit is contained in:
Yuki Okushi 2019-07-12 11:02:45 +09:00 committed by Who? Me?!
parent a8b434de11
commit 842cfe96f4
5 changed files with 6 additions and 11 deletions

View File

@ -12,7 +12,7 @@ fn foo() {
let b = a.0; // moves a.0 let b = a.0; // moves a.0
// a.0 is not initializd, but a.1 still is // a.0 is not initialized, but a.1 still is
let c = a.0; // ERROR let c = a.0; // ERROR
let d = a.1; // OK let d = a.1; // OK
@ -124,4 +124,3 @@ given move-path (e.g., `a.b`) or any child of that move-path (e.g.,
[`Place`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/enum.Place.html [`Place`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/enum.Place.html
[`has_any_child_of`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/dataflow/at_location/struct.FlowAtLocation.html#method.has_any_child_of [`has_any_child_of`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/dataflow/at_location/struct.FlowAtLocation.html#method.has_any_child_of

View File

@ -236,4 +236,3 @@ tests and universal regions, as discussed above.
[`propagate_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/region_infer/struct.RegionInferenceContext.html#method.propagate_constraints [`propagate_constraints`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/region_infer/struct.RegionInferenceContext.html#method.propagate_constraints
[`check_type_tests`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/region_infer/struct.RegionInferenceContext.html#method.check_type_tests [`check_type_tests`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/region_infer/struct.RegionInferenceContext.html#method.check_type_tests
[`check_universal_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/region_infer/struct.RegionInferenceContext.html#method.check_universal_regions [`check_universal_regions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/nll/region_infer/struct.RegionInferenceContext.html#method.check_universal_regions

View File

@ -137,7 +137,7 @@ by invoking `constraint_sccs.scc(r)`.
Working in terms of SCCs allows us to be more efficient: if we have a Working in terms of SCCs allows us to be more efficient: if we have a
set of regions `'a...'d` that are part of a single SCC, we don't have set of regions `'a...'d` that are part of a single SCC, we don't have
to compute/store their values separarely. We can just store one value to compute/store their values separately. We can just store one value
**for the SCC**, since they must all be equal. **for the SCC**, since they must all be equal.
If you look over the region inference code, you will see that a number If you look over the region inference code, you will see that a number
@ -220,5 +220,3 @@ taking into account all of the liveness and outlives
constraints. However, in order to complete the process, we must also constraints. However, in order to complete the process, we must also
consider [member constraints][m_c], which are described in [a later consider [member constraints][m_c], which are described in [a later
section][m_c]. section][m_c].

View File

@ -52,7 +52,7 @@ based on their index:
In fact, the universal regions can be further subdivided based on In fact, the universal regions can be further subdivided based on
where they were brought into scope (see the [`RegionClassification`] where they were brought into scope (see the [`RegionClassification`]
type). These subdivions are not important for the topics discussed type). These subdivisions are not important for the topics discussed
here, but become important when we consider [closure constraint here, but become important when we consider [closure constraint
propagation](./closure_constraints.html), so we discuss them there. propagation](./closure_constraints.html), so we discuss them there.

View File

@ -176,7 +176,7 @@ region being inferred. However, it is somewhat arbitrary.
In practice, computing upper bounds is a bit inconvenient, because our In practice, computing upper bounds is a bit inconvenient, because our
data structures are setup for the opposite. What we do is to compute data structures are setup for the opposite. What we do is to compute
the **reverse SCC graph** (we do this lazilly and cache the result) -- the **reverse SCC graph** (we do this lazily and cache the result) --
that is, a graph where `'a: 'b` induces an edge `SCC('b) -> that is, a graph where `'a: 'b` induces an edge `SCC('b) ->
SCC('a)`. Like the normal SCC graph, this is a DAG. We can then do a SCC('a)`. Like the normal SCC graph, this is a DAG. We can then do a
depth-first search starting from `SCC('0)` in this graph. This will depth-first search starting from `SCC('0)` in this graph. This will
@ -190,4 +190,3 @@ parameters, their value will contain themselves (i.e., the initial
value for `'a` includes `'a` and the value for `'b` contains `'b`). So value for `'a` includes `'a` and the value for `'b` contains `'b`). So
we can collect all of the lifetime parameters that are reachable, we can collect all of the lifetime parameters that are reachable,
which is precisely what we are interested in. which is precisely what we are interested in.