@@ -42,7 +42,7 @@ use crate::{
4242
4343type Res = def:: Res < NodeId > ;
4444
45- pub ( crate ) struct ImportResolver < ' r , ' ra , ' tcx > {
45+ struct ImportResolver < ' r , ' ra , ' tcx > {
4646 r : CmResolver < ' r , ' ra , ' tcx > , // always immutable
4747 outputs : ImportResolutionOutputs < ' ra > ,
4848}
@@ -59,16 +59,6 @@ struct ImportResolutionOutputs<'ra> {
5959 single_import_bindings : PerNS < Vec < ( Module < ' ra > , Import < ' ra > , PendingBinding < ' ra > ) > > ,
6060}
6161
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-
7262impl < ' ra > ImportResolutionOutputs < ' ra > {
7363 fn commit < ' tcx > ( self , r : & mut Resolver < ' ra , ' tcx > ) {
7464 r. indeterminate_imports = self . indeterminate_imports ;
@@ -646,7 +636,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
646636 prev_indeterminate_count = indeterminate_count;
647637 let batch = mem:: take ( & mut self . indeterminate_imports ) ;
648638 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) ;
650641 self . assert_speculative = false ;
651642 indeterminate_count = count;
652643 outputs. commit ( self ) ;
@@ -666,7 +657,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
666657 _ => self . outputs . indeterminate_imports . push ( import) ,
667658 }
668659 }
669- ( self . into_outputs ( ) , indeterminate_count)
660+ ( self . outputs , indeterminate_count)
670661 }
671662
672663 pub ( crate ) fn finalize_imports ( & mut self ) {
0 commit comments