Move the dataflow framework to its own crate.

This commit is contained in:
Camille GILLOT 2021-01-05 19:53:07 +01:00
parent f7aaa2a200
commit 06ae9e43d0
2 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,7 @@ extern crate rustc_infer;
extern crate rustc_lexer;
extern crate rustc_lint;
extern crate rustc_middle;
extern crate rustc_mir;
extern crate rustc_mir_dataflow;
extern crate rustc_parse;
extern crate rustc_parse_format;
extern crate rustc_session;

View File

@ -15,7 +15,7 @@ use rustc_middle::mir::{
Mutability,
};
use rustc_middle::ty::{self, fold::TypeVisitor, Ty, TyCtxt};
use rustc_mir::dataflow::{Analysis, AnalysisDomain, GenKill, GenKillAnalysis, ResultsCursor};
use rustc_mir_dataflow::{Analysis, AnalysisDomain, GenKill, GenKillAnalysis, ResultsCursor};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::{BytePos, Span};
use rustc_span::sym;
@ -625,7 +625,10 @@ impl<'a, 'tcx> mir::visit::Visitor<'tcx> for PossibleBorrowerVisitor<'a, 'tcx> {
.flat_map(HybridBitSet::iter)
.collect();
if ContainsRegion(self.cx.tcx).visit_ty(self.body.local_decls[*dest].ty).is_break() {
if ContainsRegion(self.cx.tcx)
.visit_ty(self.body.local_decls[*dest].ty)
.is_break()
{
mutable_variables.push(*dest);
}