diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-08-08 15:14:17 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-08-08 15:14:17 +0000 |
| commit | a5adde8eaae4ad5d9510897b02117bf0a9f45d0b (patch) | |
| tree | e81844422e83e28853c32c817b17709875540200 /compiler/rustc_borrowck/src/polonius/mod.rs | |
| parent | f4094ea25236bc4ba3d9b7b03d2674ba7ab92907 (diff) | |
| download | rust-a5adde8eaae4ad5d9510897b02117bf0a9f45d0b.tar.gz rust-a5adde8eaae4ad5d9510897b02117bf0a9f45d0b.zip | |
simplify polonius=next
Remove incomplete handling of kills during traversal for loan liveness to get to a simpler and actionable prototype. This handles the cases, on sufficiently simple examples, that were deferred from NLLs (NLL problem case 3, lending iterators), and is still a good step to put in people's hands without needing to wait for another full implementation. This is a practical cut in scope, but it also shows where are the areas of improvement, that we will explore in the future.
Diffstat (limited to 'compiler/rustc_borrowck/src/polonius/mod.rs')
| -rw-r--r-- | compiler/rustc_borrowck/src/polonius/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_borrowck/src/polonius/mod.rs b/compiler/rustc_borrowck/src/polonius/mod.rs index 142ef8ba28e..a9092b1981e 100644 --- a/compiler/rustc_borrowck/src/polonius/mod.rs +++ b/compiler/rustc_borrowck/src/polonius/mod.rs @@ -146,8 +146,8 @@ impl PoloniusContext { /// - converting NLL typeck constraints to be localized /// - encoding liveness constraints /// - /// Then, this graph is traversed, and combined with kills, reachability is recorded as loan - /// liveness, to be used by the loan scope and active loans computations. + /// Then, this graph is traversed, reachability is recorded as loan liveness, to be used by the + /// loan scope and active loans computations. /// /// The constraint data will be used to compute errors and diagnostics. pub(crate) fn compute_loan_liveness<'tcx>( @@ -182,8 +182,6 @@ impl PoloniusContext { // Now that we have a complete graph, we can compute reachability to trace the liveness of // loans for the next step in the chain, the NLL loan scope and active loans computations. let live_loans = compute_loan_liveness( - tcx, - body, regioncx.liveness_constraints(), regioncx.outlives_constraints(), borrow_set, |
