5
5
6
6
use crate :: dep_graph:: { DepKind , DepTrackingMapConfig } ;
7
7
use std:: marker:: PhantomData ;
8
- use syntax_pos:: DUMMY_SP ;
9
8
use crate :: infer:: InferCtxt ;
10
- use syntax_pos:: Span ;
11
9
use crate :: traits:: { FulfillmentContext , Obligation , ObligationCause , SelectionContext ,
12
10
TraitEngine , Vtable } ;
13
11
use crate :: ty:: { self , Ty , TyCtxt } ;
@@ -69,7 +67,7 @@ pub fn codegen_fulfill_obligation<'a, 'tcx>(ty: TyCtxt<'a, 'tcx, 'tcx>,
69
67
debug ! ( "fulfill_obligation: register_predicate_obligation {:?}" , predicate) ;
70
68
fulfill_cx. register_predicate_obligation ( & infcx, predicate) ;
71
69
} ) ;
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) ;
73
71
74
72
info ! ( "Cache miss: {:?} => {:?}" , trait_ref, vtable) ;
75
73
vtable
@@ -141,7 +139,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
141
139
/// unified, and hence we need to process those obligations to get
142
140
/// the complete picture of the type.
143
141
fn drain_fulfillment_cx_or_panic < T > ( & self ,
144
- span : Span ,
145
142
fulfill_cx : & mut FulfillmentContext < ' tcx > ,
146
143
result : & T )
147
144
-> T :: Lifted
@@ -153,15 +150,14 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
153
150
// contains unbound type parameters. It could be a slight
154
151
// optimization to stop iterating early.
155
152
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) ;
158
154
}
159
155
160
156
let result = self . resolve_type_vars_if_possible ( result) ;
161
157
let result = self . tcx . erase_regions ( & result) ;
162
158
163
159
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)
165
161
)
166
162
}
167
163
}
0 commit comments