@@ -17,7 +17,7 @@ use rustc::hir::map::definitions::DefPathData;
17
17
use rustc:: infer:: InferCtxt ;
18
18
use rustc:: ty:: { self , ParamEnv , TyCtxt } ;
19
19
use rustc:: ty:: maps:: Providers ;
20
- use rustc:: mir:: { AssertMessage , BasicBlock , BorrowKind , Location , Place } ;
20
+ use rustc:: mir:: { AssertMessage , BasicBlock , BorrowKind , Local , Location , Place , Visitor } ;
21
21
use rustc:: mir:: { Mir , Mutability , Operand , Projection , ProjectionElem , Rvalue } ;
22
22
use rustc:: mir:: { Field , Statement , StatementKind , Terminator , TerminatorKind } ;
23
23
use rustc:: mir:: ClosureRegionRequirements ;
@@ -56,6 +56,20 @@ mod prefixes;
56
56
57
57
use std:: borrow:: Cow ;
58
58
59
+ struct FindLocalAssignmentVisitor {
60
+ from : Local ,
61
+ loc : Vec < Location > ,
62
+ }
63
+
64
+ impl < ' tcx > Visitor < ' tcx > for FindLocalAssignmentVisitor {
65
+ fn visit_local ( & mut self ,
66
+ local : & mut Local ,
67
+ _: PlaceContext < ' tcx > ,
68
+ _: Location ) {
69
+ Visitor :: visit_local ( local, )
70
+ }
71
+ }
72
+
59
73
pub ( crate ) mod nll;
60
74
61
75
pub fn provide ( providers : & mut Providers ) {
@@ -2271,3 +2285,11 @@ impl ContextKind {
2271
2285
}
2272
2286
}
2273
2287
}
2288
+
2289
+ impl Mir {
2290
+ fn find_assignments ( & self , local : Local ) -> Vec < Location >
2291
+ {
2292
+
2293
+ }
2294
+ }
2295
+
0 commit comments