@@ -128,8 +128,7 @@ use rustc_target::spec::abi::Abi;
128
128
use rustc_trait_selection:: traits;
129
129
use rustc_trait_selection:: traits:: error_reporting:: recursive_type_with_infinite_size_error;
130
130
use rustc_trait_selection:: traits:: error_reporting:: suggestions:: ReturnsVisitor ;
131
-
132
- use std:: cell:: { Ref , RefCell , RefMut } ;
131
+ use std:: cell:: RefCell ;
133
132
134
133
use crate :: require_c_abi_if_c_variadic;
135
134
use crate :: util:: common:: indenter;
@@ -900,32 +899,6 @@ enum TupleArgumentsFlag {
900
899
TupleArguments ,
901
900
}
902
901
903
- /// A wrapper for `InferCtxt`'s `in_progress_typeck_results` field.
904
- #[ derive( Copy , Clone ) ]
905
- struct MaybeInProgressTables < ' a , ' tcx > {
906
- maybe_typeck_results : Option < & ' a RefCell < ty:: TypeckResults < ' tcx > > > ,
907
- }
908
-
909
- impl < ' a , ' tcx > MaybeInProgressTables < ' a , ' tcx > {
910
- fn borrow ( self ) -> Ref < ' a , ty:: TypeckResults < ' tcx > > {
911
- match self . maybe_typeck_results {
912
- Some ( typeck_results) => typeck_results. borrow ( ) ,
913
- None => bug ! (
914
- "MaybeInProgressTables: inh/fcx.typeck_results.borrow() with no typeck results"
915
- ) ,
916
- }
917
- }
918
-
919
- fn borrow_mut ( self ) -> RefMut < ' a , ty:: TypeckResults < ' tcx > > {
920
- match self . maybe_typeck_results {
921
- Some ( typeck_results) => typeck_results. borrow_mut ( ) ,
922
- None => bug ! (
923
- "MaybeInProgressTables: inh/fcx.typeck_results.borrow_mut() with no typeck results"
924
- ) ,
925
- }
926
- }
927
- }
928
-
929
902
fn typeck_item_bodies ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) {
930
903
tcx. hir ( ) . par_body_owners ( |body_owner_def_id| tcx. ensure ( ) . typeck ( body_owner_def_id) ) ;
931
904
}
0 commit comments