14
14
//! but is not as ugly as it is right now.
15
15
16
16
use rustc:: mir:: { BasicBlock , Location } ;
17
+ use rustc:: ty:: RegionVid ;
17
18
use rustc_data_structures:: indexed_set:: Iter ;
18
19
20
+ use borrow_check:: location:: LocationIndex ;
21
+
22
+ use polonius_engine:: Output ;
23
+
19
24
use dataflow:: { MaybeInitializedPlaces , MaybeUninitializedPlaces } ;
20
25
use dataflow:: { EverInitializedPlaces , MovingOutStatements } ;
21
26
use dataflow:: { Borrows } ;
22
27
use dataflow:: { FlowAtLocation , FlowsAtLocation } ;
23
28
use dataflow:: move_paths:: HasMoveData ;
24
29
use dataflow:: move_paths:: indexes:: BorrowIndex ;
25
30
use std:: fmt;
31
+ use std:: rc:: Rc ;
26
32
27
33
// (forced to be `pub` due to its use as an associated type below.)
28
34
crate struct Flows < ' b , ' gcx : ' tcx , ' tcx : ' b > {
@@ -31,6 +37,9 @@ crate struct Flows<'b, 'gcx: 'tcx, 'tcx: 'b> {
31
37
pub uninits : FlowAtLocation < MaybeUninitializedPlaces < ' b , ' gcx , ' tcx > > ,
32
38
pub move_outs : FlowAtLocation < MovingOutStatements < ' b , ' gcx , ' tcx > > ,
33
39
pub ever_inits : FlowAtLocation < EverInitializedPlaces < ' b , ' gcx , ' tcx > > ,
40
+
41
+ /// Polonius Output
42
+ pub polonius_output : Option < Rc < Output < RegionVid , BorrowIndex , LocationIndex > > > ,
34
43
}
35
44
36
45
impl < ' b , ' gcx , ' tcx > Flows < ' b , ' gcx , ' tcx > {
@@ -40,13 +49,15 @@ impl<'b, 'gcx, 'tcx> Flows<'b, 'gcx, 'tcx> {
40
49
uninits : FlowAtLocation < MaybeUninitializedPlaces < ' b , ' gcx , ' tcx > > ,
41
50
move_outs : FlowAtLocation < MovingOutStatements < ' b , ' gcx , ' tcx > > ,
42
51
ever_inits : FlowAtLocation < EverInitializedPlaces < ' b , ' gcx , ' tcx > > ,
52
+ polonius_output : Option < Rc < Output < RegionVid , BorrowIndex , LocationIndex > > > ,
43
53
) -> Self {
44
54
Flows {
45
55
borrows,
46
56
inits,
47
57
uninits,
48
58
move_outs,
49
59
ever_inits,
60
+ polonius_output,
50
61
}
51
62
}
52
63
0 commit comments