@@ -42,7 +42,7 @@ use crate::{
42
42
43
43
type Res = def:: Res < NodeId > ;
44
44
45
- pub ( crate ) struct ImportResolver < ' r , ' ra , ' tcx > {
45
+ struct ImportResolver < ' r , ' ra , ' tcx > {
46
46
r : CmResolver < ' r , ' ra , ' tcx > , // always immutable
47
47
outputs : ImportResolutionOutputs < ' ra > ,
48
48
}
@@ -59,16 +59,6 @@ struct ImportResolutionOutputs<'ra> {
59
59
single_import_bindings : PerNS < Vec < ( Module < ' ra > , Import < ' ra > , PendingBinding < ' ra > ) > > ,
60
60
}
61
61
62
- impl < ' r , ' ra , ' tcx > ImportResolver < ' r , ' ra , ' tcx > {
63
- pub ( crate ) fn new ( cmr : CmResolver < ' r , ' ra , ' tcx > ) -> Self {
64
- ImportResolver { r : cmr, outputs : Default :: default ( ) }
65
- }
66
-
67
- fn into_outputs ( self ) -> ImportResolutionOutputs < ' ra > {
68
- self . outputs
69
- }
70
- }
71
-
72
62
impl < ' ra > ImportResolutionOutputs < ' ra > {
73
63
fn commit < ' tcx > ( self , r : & mut Resolver < ' ra , ' tcx > ) {
74
64
r. indeterminate_imports = self . indeterminate_imports ;
@@ -646,7 +636,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
646
636
prev_indeterminate_count = indeterminate_count;
647
637
let batch = mem:: take ( & mut self . indeterminate_imports ) ;
648
638
self . assert_speculative = true ;
649
- let ( outputs, count) = ImportResolver :: new ( self . cm ( ) ) . resolve_batch ( batch) ;
639
+ let ( outputs, count) =
640
+ ImportResolver { r : self . cm ( ) , outputs : Default :: default ( ) } . resolve_batch ( batch) ;
650
641
self . assert_speculative = false ;
651
642
indeterminate_count = count;
652
643
outputs. commit ( self ) ;
@@ -666,7 +657,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
666
657
_ => self . outputs . indeterminate_imports . push ( import) ,
667
658
}
668
659
}
669
- ( self . into_outputs ( ) , indeterminate_count)
660
+ ( self . outputs , indeterminate_count)
670
661
}
671
662
672
663
pub ( crate ) fn finalize_imports ( & mut self ) {
0 commit comments