File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
src/librustc_mir/transform Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -329,36 +329,6 @@ impl<'tcx> Visitor<'tcx> for StorageIgnored {
329329 }
330330}
331331
332- struct BorrowedLocals ( liveness:: LiveVarSet < Local > ) ;
333-
334- fn mark_as_borrowed < ' tcx > ( place : & Place < ' tcx > , locals : & mut BorrowedLocals ) {
335- match * place {
336- Place :: Local ( l) => { locals. 0 . insert ( l) ; } ,
337- Place :: Promoted ( _) |
338- Place :: Static ( ..) => ( ) ,
339- Place :: Projection ( ref proj) => {
340- match proj. elem {
341- // For derefs we don't look any further.
342- // If it pointed to a Local, it would already be borrowed elsewhere
343- ProjectionElem :: Deref => ( ) ,
344- _ => mark_as_borrowed ( & proj. base , locals)
345- }
346- }
347- }
348- }
349-
350- impl < ' tcx > Visitor < ' tcx > for BorrowedLocals {
351- fn visit_rvalue ( & mut self ,
352- rvalue : & Rvalue < ' tcx > ,
353- location : Location ) {
354- if let Rvalue :: Ref ( _, _, ref place) = * rvalue {
355- mark_as_borrowed ( place, self ) ;
356- }
357-
358- self . super_rvalue ( rvalue, location)
359- }
360- }
361-
362332fn locals_live_across_suspend_points (
363333 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
364334 mir : & Mir < ' tcx > ,
You can’t perform that action at this time.
0 commit comments