INNER CODE UNIT · Rust

visit_nested_body

willcrichton/flowistry · crates/flowistry_ifc/src/lib.rs:66

  fn visit_nested_body(&mut self, body_id: BodyId) {
    intravisit::walk_body(self, self.tcx.hir_body(body_id));

    let tcx = self.tcx;
    let local_def_id = tcx.hir_body_owner_def_id(body_id);
    let body_with_facts = borrowck_facts::get_body_with_borrowck_facts(tcx, local_def_id);
    let flow = &infoflow::compute_flow(tcx, body_id, body_with_facts);
    if let IssueFound::Yes = analysis::analyze(&body_id, flow).unwrap() {
      self.issue_found = IssueFound::Yes;
    }
  }
}

pub struct Callbacks;
impl rustc_driver::Callbacks for Callbacks {
  fn config(&mut self, config: &mut rustc_interface::Config) {
    borrowck_facts::enable_mir_simplification();
    config.override_queries = Some(borrowck_facts::override_queries);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…