@@ -128,8 +128,7 @@ use rustc_target::spec::abi::Abi;
128128use rustc_trait_selection:: traits;
129129use rustc_trait_selection:: traits:: error_reporting:: recursive_type_with_infinite_size_error;
130130use rustc_trait_selection:: traits:: error_reporting:: suggestions:: ReturnsVisitor ;
131-
132- use std:: cell:: { Ref , RefCell , RefMut } ;
131+ use std:: cell:: RefCell ;
133132
134133use crate :: require_c_abi_if_c_variadic;
135134use crate :: util:: common:: indenter;
@@ -900,32 +899,6 @@ enum TupleArgumentsFlag {
900899 TupleArguments ,
901900}
902901
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-
929902fn typeck_item_bodies ( tcx : TyCtxt < ' _ > , ( ) : ( ) ) {
930903 tcx. hir ( ) . par_body_owners ( |body_owner_def_id| tcx. ensure ( ) . typeck ( body_owner_def_id) ) ;
931904}
0 commit comments