@@ -532,7 +532,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
532532 } ;
533533
534534 let err_msg = self . get_standard_error_message (
535- & main_trait_predicate,
535+ main_trait_predicate,
536536 message,
537537 predicate_is_const,
538538 append_const_msg,
@@ -603,7 +603,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
603603 let explanation = get_explanation_based_on_obligation (
604604 self . tcx ,
605605 & obligation,
606- & leaf_trait_predicate,
606+ leaf_trait_predicate,
607607 pre_message,
608608 ) ;
609609
@@ -654,7 +654,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
654654
655655 let UnsatisfiedConst ( unsatisfied_const) = self
656656 . maybe_add_note_for_unsatisfied_const (
657- & leaf_trait_predicate,
657+ leaf_trait_predicate,
658658 & mut err,
659659 span,
660660 ) ;
@@ -671,7 +671,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
671671 err. span_label ( tcx. def_span ( body) , s) ;
672672 }
673673
674- self . suggest_floating_point_literal ( & obligation, & mut err, & leaf_trait_ref) ;
674+ self . suggest_floating_point_literal ( & obligation, & mut err, leaf_trait_ref) ;
675675 self . suggest_dereferencing_index ( & obligation, & mut err, leaf_trait_predicate) ;
676676 suggested |= self . suggest_dereferences ( & obligation, & mut err, leaf_trait_predicate) ;
677677 suggested |= self . suggest_fn_call ( & obligation, & mut err, leaf_trait_predicate) ;
@@ -706,7 +706,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
706706 span,
707707 leaf_trait_predicate,
708708 ) ;
709- self . note_version_mismatch ( & mut err, & leaf_trait_ref) ;
709+ self . note_version_mismatch ( & mut err, leaf_trait_ref) ;
710710 self . suggest_remove_await ( & obligation, & mut err) ;
711711 self . suggest_derive ( & obligation, & mut err, leaf_trait_predicate) ;
712712
@@ -754,7 +754,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
754754
755755 self . try_to_add_help_message (
756756 & obligation,
757- & leaf_trait_predicate,
757+ leaf_trait_predicate,
758758 & mut err,
759759 span,
760760 is_fn_trait,
@@ -2226,11 +2226,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
22262226 /// If the `Self` type of the unsatisfied trait `trait_ref` implements a trait
22272227 /// with the same path as `trait_ref`, a help message about
22282228 /// a probable version mismatch is added to `err`
2229- fn note_version_mismatch (
2230- & self ,
2231- err : & mut Diag < ' _ > ,
2232- trait_ref : & ty:: PolyTraitRef < ' tcx > ,
2233- ) -> bool {
2229+ fn note_version_mismatch ( & self , err : & mut Diag < ' _ > , trait_ref : ty:: PolyTraitRef < ' tcx > ) -> bool {
22342230 let get_trait_impls = |trait_def_id| {
22352231 let mut trait_impls = vec ! [ ] ;
22362232 self . tcx . for_each_relevant_impl (
@@ -3034,7 +3030,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
30343030
30353031 fn get_standard_error_message (
30363032 & self ,
3037- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3033+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
30383034 message : Option < String > ,
30393035 predicate_is_const : bool ,
30403036 append_const_msg : Option < AppendConstMessage > ,
@@ -3205,7 +3201,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32053201 fn try_to_add_help_message (
32063202 & self ,
32073203 obligation : & PredicateObligation < ' tcx > ,
3208- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3204+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
32093205 err : & mut Diag < ' _ > ,
32103206 span : Span ,
32113207 is_fn_trait : bool ,
@@ -3237,7 +3233,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32373233 params,
32383234 ) ;
32393235 } else if !trait_predicate. has_non_region_infer ( )
3240- && self . predicate_can_apply ( obligation. param_env , * trait_predicate)
3236+ && self . predicate_can_apply ( obligation. param_env , trait_predicate)
32413237 {
32423238 // If a where-clause may be useful, remind the
32433239 // user that they can add it.
@@ -3248,7 +3244,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32483244 // which is somewhat confusing.
32493245 self . suggest_restricting_param_bound (
32503246 err,
3251- * trait_predicate,
3247+ trait_predicate,
32523248 None ,
32533249 obligation. cause . body_id ,
32543250 ) ;
@@ -3263,7 +3259,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32633259 ) ;
32643260 } else if !suggested && !unsatisfied_const {
32653261 // Can't show anything else useful, try to find similar impls.
3266- let impl_candidates = self . find_similar_impl_candidates ( * trait_predicate) ;
3262+ let impl_candidates = self . find_similar_impl_candidates ( trait_predicate) ;
32673263 if !self . report_similar_impl_candidates (
32683264 & impl_candidates,
32693265 trait_predicate. to_poly_trait_ref ( ) ,
@@ -3274,7 +3270,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32743270 ) {
32753271 self . report_similar_impl_candidates_for_root_obligation (
32763272 obligation,
3277- * trait_predicate,
3273+ trait_predicate,
32783274 body_def_id,
32793275 err,
32803276 ) ;
@@ -3348,7 +3344,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
33483344
33493345 fn maybe_add_note_for_unsatisfied_const (
33503346 & self ,
3351- _trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3347+ _trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
33523348 _err : & mut Diag < ' _ > ,
33533349 _span : Span ,
33543350 ) -> UnsatisfiedConst {
0 commit comments