Move the dataflow framework to its own crate.
This commit is contained in:
parent
f7aaa2a200
commit
06ae9e43d0
@ -31,7 +31,7 @@
|
||||
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;
|
||||
|
@ -15,7 +15,7 @@
|
||||
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 @@ fn visit_terminator(&mut self, terminator: &mir::Terminator<'_>, _loc: mir::Loca
|
||||
.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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user