@@ -258,14 +258,15 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
258
258
let param_env_and_self_ty =
259
259
self . infcx . canonicalize_query ( & ( self . param_env , self_ty) , & mut orig_values) ;
260
260
261
- // XXX : consider caching this "whole op" here.
261
+ // FIXME : consider caching this "whole op" here.
262
262
let steps = if mode == Mode :: MethodCall {
263
263
create_steps_inner ( self . tcx . global_tcx ( ) , span, param_env_and_self_ty)
264
264
} else {
265
- // XXX : don't make an inference context for nothing here
265
+ // FIXME : don't make an inference context for nothing here
266
266
self . tcx . global_tcx ( ) . infer_ctxt ( ) . enter ( |ref infcx| {
267
267
let ( ( _, self_ty) , canonical_inference_vars) =
268
- infcx. instantiate_canonical_with_fresh_inference_vars ( span, & param_env_and_self_ty) ;
268
+ infcx. instantiate_canonical_with_fresh_inference_vars (
269
+ span, & param_env_and_self_ty) ;
269
270
CreateStepsResult {
270
271
steps : vec ! [ CandidateStep {
271
272
self_ty: do_make_query_result( infcx, & canonical_inference_vars, self_ty) ,
@@ -324,7 +325,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
324
325
// that we create during the probe process are removed later
325
326
self . probe ( |_| {
326
327
let mut probe_cx = ProbeContext :: new (
327
- self , span, mode, method_name, return_type, orig_values, Rc :: new ( steps. steps ) , is_suggestion,
328
+ self , span, mode, method_name, return_type, orig_values,
329
+ Rc :: new ( steps. steps ) , is_suggestion,
328
330
) ;
329
331
330
332
probe_cx. assemble_inherent_candidates ( ) ;
@@ -419,7 +421,8 @@ fn create_steps_inner<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'gcx>,
419
421
let dereferences = steps. len ( ) - 1 ;
420
422
421
423
steps. push ( CandidateStep {
422
- self_ty : do_make_query_result ( infcx, & inference_vars, infcx. tcx . mk_slice ( elem_ty) ) ,
424
+ self_ty : do_make_query_result ( infcx, & inference_vars,
425
+ infcx. tcx . mk_slice ( elem_ty) ) ,
423
426
autoderefs : dereferences,
424
427
// this could be from an unsafe deref if we had
425
428
// a *mut/const [T; N]
@@ -516,8 +519,9 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
516
519
ty:: Dynamic ( ref data, ..) => {
517
520
if let Some ( p) = data. principal ( ) {
518
521
self . fcx . probe ( |_| {
519
- let InferOk { value : self_ty, obligations : _ } = do_instantiate_query_result (
520
- self . fcx , self . span , & self . orig_values , self_ty)
522
+ let InferOk { value : self_ty, obligations : _ } =
523
+ do_instantiate_query_result ( self . fcx , self . span ,
524
+ & self . orig_values , self_ty)
521
525
. unwrap_or_else ( |_| {
522
526
span_bug ! ( self . span, "{:?} was applicable but now isn't?" , self_ty)
523
527
} ) ;
@@ -693,7 +697,8 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
693
697
if let Some ( p) = data. principal ( ) {
694
698
p
695
699
} else {
696
- span_bug ! ( self . span, "bad object {:?} in assemble_inherent_candidates_from_object" ,
700
+ span_bug ! ( self . span,
701
+ "bad object {:?} in assemble_inherent_candidates_from_object" ,
697
702
self_ty) ;
698
703
}
699
704
} ,
@@ -1017,7 +1022,10 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
1017
1022
} )
1018
1023
}
1019
1024
1020
- fn pick_autorefd_method ( & mut self , step : & CandidateStep < ' gcx > , self_ty : Ty < ' tcx > , mutbl : hir:: Mutability )
1025
+ fn pick_autorefd_method ( & mut self ,
1026
+ step : & CandidateStep < ' gcx > ,
1027
+ self_ty : Ty < ' tcx > ,
1028
+ mutbl : hir:: Mutability )
1021
1029
-> Option < PickResult < ' tcx > > {
1022
1030
let tcx = self . tcx ;
1023
1031
0 commit comments