]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/nll/facts.rs
polonius: add generation of liveneness-related facts
[rust.git] / src / librustc_mir / borrow_check / nll / facts.rs
index d84afeac1852352e71500112c7e849c00322d300..33854d991eea7b09e90bf6cac2ef3aa81dad2ba2 100644 (file)
@@ -2,6 +2,7 @@
 use crate::dataflow::indexes::BorrowIndex;
 use polonius_engine::AllFacts as PoloniusAllFacts;
 use polonius_engine::Atom;
+use rustc::mir::Local;
 use rustc::ty::{RegionVid, TyCtxt};
 use rustc_data_structures::indexed_vec::Idx;
 use std::error::Error;
@@ -10,7 +11,7 @@
 use std::io::Write;
 use std::path::Path;
 
-crate type AllFacts = PoloniusAllFacts<RegionVid, BorrowIndex, LocationIndex>;
+crate type AllFacts = PoloniusAllFacts<RegionVid, BorrowIndex, LocationIndex, Local>;
 
 crate trait AllFactsExt {
     /// Returns `true` if there is a need to gather `AllFacts` given the
@@ -60,6 +61,12 @@ macro_rules! write_facts_to_path {
                 outlives,
                 region_live_at,
                 invalidates,
+                var_used,
+                var_defined,
+                var_drop_used,
+                var_uses_region,
+                var_drops_region,
+                var_initialized_on_exit,
             ])
         }
         Ok(())