about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-01-15 14:20:48 +0100
committerlcnr <rust@lcnr.de>2025-01-15 14:23:48 +0100
commitf8f912d330b04ee761b1edaaeb70117eee3abb62 (patch)
treedef441eb124db8664ce58ecbdaf16d47a4c00af5
parent1df83a7d15bc8f75808aaae472e9c077c6bb9b07 (diff)
downloadrust-f8f912d330b04ee761b1edaaeb70117eee3abb62.tar.gz
rust-f8f912d330b04ee761b1edaaeb70117eee3abb62.zip
nyaa
-rw-r--r--src/doc/rustc-dev-guide/src/borrow_check/region_inference/closure_constraints.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/src/borrow_check/region_inference/closure_constraints.md b/src/doc/rustc-dev-guide/src/borrow_check/region_inference/closure_constraints.md
index be279b773cf..b95c9f72306 100644
--- a/src/doc/rustc-dev-guide/src/borrow_check/region_inference/closure_constraints.md
+++ b/src/doc/rustc-dev-guide/src/borrow_check/region_inference/closure_constraints.md
@@ -31,9 +31,9 @@ It starts by calling `fn try_promote_type_test_subject`. This function takes the
 
 We then promote the `lower_bound` into the context of the caller. If the lower bound is equal to a placeholder, we replace it with `'static`
 
-We then look at all universal regions `uv` which are required to outlive `lower_bound`, i.e. for which borrow checking adding region constraints. For each of these we then emit a `ClosureOutlivesRequirement` for non-local universal regions which are known to outlive `uv`.
+We then look at all universal regions `uv` which are required to be outlived by `lower_bound`, i.e. for which borrow checking added region constraints. For each of these we then emit a `ClosureOutlivesRequirement` for all non-local universal regions which are known to outlive `uv`.
 
-As we've already built the region graph of the closure at this point and emitted errors if that one is inconsistent, we are also able to assume that the outlive constraints `uv: lower_bound` hold.
+As we've already built the region graph of the closure at this point and separately check that it is consistent, we are also able to assume the outlive constraints `uv: lower_bound` here.
 
 So if we have a type-outlives bounds we can't prove, e.g. `T: 'local_infer`, we use the region graph to go to universal variables `'a` with `'a: local_infer`. In case `'a` are local, we then use the assumed outlived constraints to go to non-local ones.