Skip to content

Commit 531e4ab

Browse files
committed
Auto merge of #50798 - bobtwinkles:nll_facts_invalidate, r=nikomatsakis
Generate "invalidates" facts when -Znll-facts is passed Most of the new code is copied directly from the heart of the MIR borrowchecker. I was expecting more fundamental structural changes, hence the copying. This appears to work as it stands, but I'd like to submit a follow-up PR to reduce code duplication. I figured that could wait though, since this is blocking a large amount of work in the borrow check repository and I'm out of time for tonight =). r? @nikomatsakis
2 parents 9a4e5df + 965eef9 commit 531e4ab

File tree

3 files changed

+983
-0
lines changed

3 files changed

+983
-0
lines changed

src/librustc_mir/borrow_check/nll/facts.rs

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ crate struct AllFacts {
3838

3939
// `region_live_at(R, P)` when the region R appears in a live variable at P
4040
crate region_live_at: Vec<(RegionVid, LocationIndex)>,
41+
42+
// `invalidates(P, B)` when the borrow B is invalidated at point P
43+
crate invalidates: Vec<(LocationIndex, BorrowIndex)>,
4144
}
4245

4346
impl AllFacts {
@@ -69,6 +72,7 @@ impl AllFacts {
6972
killed,
7073
outlives,
7174
region_live_at,
75+
invalidates,
7276
])
7377
}
7478
Ok(())

0 commit comments

Comments
 (0)