@@ -71,24 +71,24 @@ type BorrowedLocalsResults<'a, 'tcx> = ResultsRefCursor<'a, 'a, 'tcx, MaybeBorro
7171
7272/// Dataflow analysis that determines whether each local requires storage at a
7373/// given location; i.e. whether its storage can go away without being observed.
74- pub struct RequiresStorage < ' mir , ' tcx > {
74+ pub struct MaybeRequiresStorage < ' mir , ' tcx > {
7575 body : ReadOnlyBodyAndCache < ' mir , ' tcx > ,
7676 borrowed_locals : RefCell < BorrowedLocalsResults < ' mir , ' tcx > > ,
7777}
7878
79- impl < ' mir , ' tcx > RequiresStorage < ' mir , ' tcx > {
79+ impl < ' mir , ' tcx > MaybeRequiresStorage < ' mir , ' tcx > {
8080 pub fn new (
8181 body : ReadOnlyBodyAndCache < ' mir , ' tcx > ,
8282 borrowed_locals : & ' mir Results < ' tcx , MaybeBorrowedLocals > ,
8383 ) -> Self {
84- RequiresStorage {
84+ MaybeRequiresStorage {
8585 body,
8686 borrowed_locals : RefCell :: new ( ResultsRefCursor :: new ( * body, borrowed_locals) ) ,
8787 }
8888 }
8989}
9090
91- impl < ' mir , ' tcx > dataflow:: AnalysisDomain < ' tcx > for RequiresStorage < ' mir , ' tcx > {
91+ impl < ' mir , ' tcx > dataflow:: AnalysisDomain < ' tcx > for MaybeRequiresStorage < ' mir , ' tcx > {
9292 type Idx = Local ;
9393
9494 const NAME : & ' static str = "requires_storage" ;
@@ -106,7 +106,7 @@ impl<'mir, 'tcx> dataflow::AnalysisDomain<'tcx> for RequiresStorage<'mir, 'tcx>
106106 }
107107}
108108
109- impl < ' mir , ' tcx > dataflow:: GenKillAnalysis < ' tcx > for RequiresStorage < ' mir , ' tcx > {
109+ impl < ' mir , ' tcx > dataflow:: GenKillAnalysis < ' tcx > for MaybeRequiresStorage < ' mir , ' tcx > {
110110 fn before_statement_effect (
111111 & self ,
112112 trans : & mut impl GenKill < Self :: Idx > ,
@@ -232,15 +232,15 @@ impl<'mir, 'tcx> dataflow::GenKillAnalysis<'tcx> for RequiresStorage<'mir, 'tcx>
232232 }
233233}
234234
235- impl < ' mir , ' tcx > RequiresStorage < ' mir , ' tcx > {
235+ impl < ' mir , ' tcx > MaybeRequiresStorage < ' mir , ' tcx > {
236236 /// Kill locals that are fully moved and have not been borrowed.
237237 fn check_for_move ( & self , trans : & mut impl GenKill < Local > , loc : Location ) {
238238 let mut visitor = MoveVisitor { trans, borrowed_locals : & self . borrowed_locals } ;
239239 visitor. visit_location ( self . body , loc) ;
240240 }
241241}
242242
243- impl < ' mir , ' tcx > BottomValue for RequiresStorage < ' mir , ' tcx > {
243+ impl < ' mir , ' tcx > BottomValue for MaybeRequiresStorage < ' mir , ' tcx > {
244244 /// bottom = dead
245245 const BOTTOM_VALUE : bool = false ;
246246}
0 commit comments