Skip to content

Commit 893939e

Browse files
committed
trim whitespace
1 parent ce90cd6 commit 893939e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

posts/inside-rust/2023-09-25-polonius-update.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn get_default<'r, K: Hash + Eq + Copy, V: Default>(
2929
} // v
3030
```
3131

32-
Returning the mutable reference `value` in the `Some` path requires the mutable loan on `map` to live until the end of the function. This prevents mutation in the `None` path even though no mutable loan on `map` would exist there in the first place.
32+
Returning the mutable reference `value` in the `Some` path requires the mutable loan on `map` to live until the end of the function. This prevents mutation in the `None` path even though no mutable loan on `map` would exist there in the first place.
3333

3434
Fixing this borrowck issue requires more precision about flow-sensitivity. It also hints at limitations in our modeling of lifetimes, which appear more clearly in cases with only slightly more complicated control flow, like [issue #47680](https://github.com/rust-lang/rust/issues/47680):
3535

@@ -88,7 +88,7 @@ Current status: ⏳ members of the types team are starting to work on this task
8888

8989
Out of the two key differences between Polonius and the existing borrow check (regions as "sets of loans", and computing subtyping relations at each point in the CFG), this step is aimed at resolving the *first* difference, but not the second, so we call it the "location *in*sensitive loans in scope" (because subtyping is being done once, not per location): the idea can be described as "NLLs with the Polonius model".
9090

91-
Note that other aspects of the existing borrow checker are still flow-sensitive.
91+
Note that other aspects of the existing borrow checker are still flow-sensitive.
9292

9393
In this step, we will compute the set of live loans via outlives constraints only, instead of computing the CFG points where regions are live (which is then used to compute when loans go out of scope). We believe this is equivalent to the existing borrow check in terms of the errors that get reported.
9494

@@ -108,11 +108,11 @@ Current status: ⏳ in-progress, the crater run itself will be done before the P
108108
### 4. Replace parts of the borrow checker with location-insensitive Polonius
109109

110110

111-
The prototype only does additional work, and does not modify the existing analysis.
111+
The prototype only does additional work, and does not modify the existing analysis.
112112

113-
In this step, we will refactor the borrow checker so that its data structures store sets of loans, and do more performance work: for example, remove redundant computation, investigate worst-case scalability and constant factors.
113+
In this step, we will refactor the borrow checker so that its data structures store sets of loans, and do more performance work: for example, remove redundant computation, investigate worst-case scalability and constant factors.
114114

115-
It's expected that performance will be similar, and we can then imagine enabling the location-insensitive pass without the feature flag, and removing some of the old code.
115+
It's expected that performance will be similar, and we can then imagine enabling the location-insensitive pass without the feature flag, and removing some of the old code.
116116

117117
To keep the high quality diagnostics from the years of work of many contributors, it's possible that the new analysis could run, and if errors are detected, only then use the existing analysis and diagnostics.
118118

@@ -136,7 +136,7 @@ Interestingly, this work is completely independent of rustc, and could in theory
136136

137137
### 7. Location-sensitive pass stable
138138

139-
In this milestone, we expect a lot of work on optimizations, and productization.
139+
In this milestone, we expect a lot of work on optimizations, and productization.
140140

141141
If a similar experience to NLLs in edition 2018 is to be expected again, another substantial amount of work and polish will also be needed to handle diagnostic differences and issues, ensuring errors and notes are clear enough, as well as the documentation.
142142

0 commit comments

Comments
 (0)