@@ -23,14 +23,12 @@ use rustc_ast::ast::Name;
23
23
use rustc_data_structures:: fx:: FxHashSet ;
24
24
use rustc_data_structures:: graph:: dominators:: { dominators, Dominators } ;
25
25
use rustc_data_structures:: graph:: { self , GraphSuccessors } ;
26
- use rustc_data_structures:: sync:: MappedLockGuard ;
27
26
use rustc_index:: bit_set:: BitMatrix ;
28
27
use rustc_index:: vec:: { Idx , IndexVec } ;
29
28
use rustc_macros:: HashStable ;
30
29
use rustc_serialize:: { Decodable , Encodable } ;
31
30
use rustc_span:: symbol:: Symbol ;
32
31
use rustc_span:: { Span , DUMMY_SP } ;
33
- use smallvec:: SmallVec ;
34
32
use std:: borrow:: Cow ;
35
33
use std:: fmt:: { self , Debug , Display , Formatter , Write } ;
36
34
use std:: ops:: { Index , IndexMut } ;
@@ -392,15 +390,6 @@ impl<'tcx> Body<'tcx> {
392
390
Location { block : bb, statement_index : self [ bb] . statements . len ( ) }
393
391
}
394
392
395
- #[ inline]
396
- pub fn predecessors_for (
397
- & self ,
398
- bb : BasicBlock ,
399
- ) -> impl std:: ops:: Deref < Target = SmallVec < [ BasicBlock ; 4 ] > > + ' _ {
400
- let predecessors = self . predecessor_cache . compute ( & self . basic_blocks ) ;
401
- MappedLockGuard :: map ( predecessors, |preds| & mut preds[ bb] )
402
- }
403
-
404
393
#[ inline]
405
394
pub fn predecessors ( & self ) -> impl std:: ops:: Deref < Target = Predecessors > + ' _ {
406
395
self . predecessor_cache . compute ( & self . basic_blocks )
@@ -2676,7 +2665,7 @@ impl graph::GraphPredecessors<'graph> for Body<'tcx> {
2676
2665
impl graph:: WithPredecessors for Body < ' tcx > {
2677
2666
#[ inline]
2678
2667
fn predecessors ( & self , node : Self :: Node ) -> <Self as graph:: GraphPredecessors < ' _ > >:: Iter {
2679
- self . predecessors_for ( node ) . clone ( ) . into_iter ( )
2668
+ self . predecessors ( ) [ node ] . clone ( ) . into_iter ( )
2680
2669
}
2681
2670
}
2682
2671
0 commit comments