55
66use crate :: dep_graph:: { DepKind , DepTrackingMapConfig } ;
77use std:: marker:: PhantomData ;
8- use syntax_pos:: DUMMY_SP ;
98use crate :: infer:: InferCtxt ;
10- use syntax_pos:: Span ;
119use crate :: traits:: { FulfillmentContext , Obligation , ObligationCause , SelectionContext ,
1210 TraitEngine , Vtable } ;
1311use crate :: ty:: { self , Ty , TyCtxt } ;
@@ -69,7 +67,7 @@ pub fn codegen_fulfill_obligation<'a, 'tcx>(ty: TyCtxt<'a, 'tcx, 'tcx>,
6967 debug ! ( "fulfill_obligation: register_predicate_obligation {:?}" , predicate) ;
7068 fulfill_cx. register_predicate_obligation ( & infcx, predicate) ;
7169 } ) ;
72- let vtable = infcx. drain_fulfillment_cx_or_panic ( DUMMY_SP , & mut fulfill_cx, & vtable) ;
70+ let vtable = infcx. drain_fulfillment_cx_or_panic ( & mut fulfill_cx, & vtable) ;
7371
7472 info ! ( "Cache miss: {:?} => {:?}" , trait_ref, vtable) ;
7573 vtable
@@ -141,7 +139,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
141139 /// unified, and hence we need to process those obligations to get
142140 /// the complete picture of the type.
143141 fn drain_fulfillment_cx_or_panic < T > ( & self ,
144- span : Span ,
145142 fulfill_cx : & mut FulfillmentContext < ' tcx > ,
146143 result : & T )
147144 -> T :: Lifted
@@ -153,15 +150,14 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
153150 // contains unbound type parameters. It could be a slight
154151 // optimization to stop iterating early.
155152 if let Err ( errors) = fulfill_cx. select_all_or_error ( self ) {
156- span_bug ! ( span, "Encountered errors `{:?}` resolving bounds after type-checking" ,
157- errors) ;
153+ bug ! ( "Encountered errors `{:?}` resolving bounds after type-checking" , errors) ;
158154 }
159155
160156 let result = self . resolve_type_vars_if_possible ( result) ;
161157 let result = self . tcx . erase_regions ( & result) ;
162158
163159 self . tcx . lift_to_global ( & result) . unwrap_or_else ( ||
164- span_bug ! ( span , "Uninferred types/regions in `{:?}`" , result)
160+ bug ! ( "Uninferred types/regions in `{:?}`" , result)
165161 )
166162 }
167163}
0 commit comments