@@ -58,7 +58,7 @@ use rustc_middle::ty::visit::TypeVisitableExt;
5858use rustc_middle:: ty:: { self , GenericArgsRef , Ty , TyCtxt , TypeAndMut } ;
5959use rustc_session:: parse:: feature_err;
6060use rustc_span:: symbol:: sym;
61- use rustc_span:: DesugaringKind ;
61+ use rustc_span:: { DesugaringKind , DUMMY_SP } ;
6262use rustc_target:: spec:: abi:: Abi ;
6363use rustc_trait_selection:: infer:: InferCtxtExt as _;
6464use rustc_trait_selection:: traits:: error_reporting:: TypeErrCtxtExt as _;
@@ -1054,7 +1054,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10541054 let source = self . resolve_vars_with_obligations ( expr_ty) ;
10551055 debug ! ( "coercion::can_with_predicates({:?} -> {:?})" , source, target) ;
10561056
1057- let cause = self . cause ( rustc_span :: DUMMY_SP , ObligationCauseCode :: ExprAssignable ) ;
1057+ let cause = self . cause ( DUMMY_SP , ObligationCauseCode :: ExprAssignable ) ;
10581058 // We don't ever need two-phase here since we throw out the result of the coercion
10591059 let coerce = Coerce :: new ( self , cause, AllowTwoPhase :: No ) ;
10601060 self . probe ( |_| {
@@ -1071,11 +1071,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10711071 /// how many dereference steps needed to achieve `expr_ty <: target`. If
10721072 /// it's not possible, return `None`.
10731073 pub fn deref_steps ( & self , expr_ty : Ty < ' tcx > , target : Ty < ' tcx > ) -> Option < usize > {
1074- let cause = self . cause ( rustc_span :: DUMMY_SP , ObligationCauseCode :: ExprAssignable ) ;
1074+ let cause = self . cause ( DUMMY_SP , ObligationCauseCode :: ExprAssignable ) ;
10751075 // We don't ever need two-phase here since we throw out the result of the coercion
10761076 let coerce = Coerce :: new ( self , cause, AllowTwoPhase :: No ) ;
10771077 coerce
1078- . autoderef ( rustc_span :: DUMMY_SP , expr_ty)
1078+ . autoderef ( DUMMY_SP , expr_ty)
10791079 . find_map ( |( ty, steps) | self . probe ( |_| coerce. unify ( ty, target) ) . ok ( ) . map ( |_| steps) )
10801080 }
10811081
@@ -1086,7 +1086,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10861086 /// trait or region sub-obligations. (presumably we could, but it's not
10871087 /// particularly important for diagnostics...)
10881088 pub fn deref_once_mutably_for_diagnostic ( & self , expr_ty : Ty < ' tcx > ) -> Option < Ty < ' tcx > > {
1089- self . autoderef ( rustc_span :: DUMMY_SP , expr_ty) . nth ( 1 ) . and_then ( |( deref_ty, _) | {
1089+ self . autoderef ( DUMMY_SP , expr_ty) . nth ( 1 ) . and_then ( |( deref_ty, _) | {
10901090 self . infcx
10911091 . type_implements_trait (
10921092 self . tcx . lang_items ( ) . deref_mut_trait ( ) ?,
0 commit comments