@@ -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
@@ -658,7 +658,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
658658
659659 let UnsatisfiedConst ( unsatisfied_const) = self
660660 . maybe_add_note_for_unsatisfied_const (
661- & leaf_trait_predicate,
661+ leaf_trait_predicate,
662662 & mut err,
663663 span,
664664 ) ;
@@ -675,7 +675,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
675675 err. span_label ( tcx. def_span ( body) , s) ;
676676 }
677677
678- self . suggest_floating_point_literal ( & obligation, & mut err, & leaf_trait_ref) ;
678+ self . suggest_floating_point_literal ( & obligation, & mut err, leaf_trait_ref) ;
679679 self . suggest_dereferencing_index ( & obligation, & mut err, leaf_trait_predicate) ;
680680 suggested |= self . suggest_dereferences ( & obligation, & mut err, leaf_trait_predicate) ;
681681 suggested |= self . suggest_fn_call ( & obligation, & mut err, leaf_trait_predicate) ;
@@ -710,7 +710,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
710710 span,
711711 leaf_trait_predicate,
712712 ) ;
713- self . note_version_mismatch ( & mut err, & leaf_trait_ref) ;
713+ self . note_version_mismatch ( & mut err, leaf_trait_ref) ;
714714 self . suggest_remove_await ( & obligation, & mut err) ;
715715 self . suggest_derive ( & obligation, & mut err, leaf_trait_predicate) ;
716716
@@ -758,7 +758,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
758758
759759 self . try_to_add_help_message (
760760 & obligation,
761- & leaf_trait_predicate,
761+ leaf_trait_predicate,
762762 & mut err,
763763 span,
764764 is_fn_trait,
@@ -2234,11 +2234,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
22342234 /// If the `Self` type of the unsatisfied trait `trait_ref` implements a trait
22352235 /// with the same path as `trait_ref`, a help message about
22362236 /// a probable version mismatch is added to `err`
2237- fn note_version_mismatch (
2238- & self ,
2239- err : & mut Diag < ' _ > ,
2240- trait_ref : & ty:: PolyTraitRef < ' tcx > ,
2241- ) -> bool {
2237+ fn note_version_mismatch ( & self , err : & mut Diag < ' _ > , trait_ref : ty:: PolyTraitRef < ' tcx > ) -> bool {
22422238 let get_trait_impls = |trait_def_id| {
22432239 let mut trait_impls = vec ! [ ] ;
22442240 self . tcx . for_each_relevant_impl (
@@ -3042,7 +3038,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
30423038
30433039 fn get_standard_error_message (
30443040 & self ,
3045- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3041+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
30463042 message : Option < String > ,
30473043 predicate_is_const : bool ,
30483044 append_const_msg : Option < AppendConstMessage > ,
@@ -3213,7 +3209,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32133209 fn try_to_add_help_message (
32143210 & self ,
32153211 obligation : & PredicateObligation < ' tcx > ,
3216- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3212+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
32173213 err : & mut Diag < ' _ > ,
32183214 span : Span ,
32193215 is_fn_trait : bool ,
@@ -3245,7 +3241,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32453241 params,
32463242 ) ;
32473243 } else if !trait_predicate. has_non_region_infer ( )
3248- && self . predicate_can_apply ( obligation. param_env , * trait_predicate)
3244+ && self . predicate_can_apply ( obligation. param_env , trait_predicate)
32493245 {
32503246 // If a where-clause may be useful, remind the
32513247 // user that they can add it.
@@ -3256,7 +3252,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32563252 // which is somewhat confusing.
32573253 self . suggest_restricting_param_bound (
32583254 err,
3259- * trait_predicate,
3255+ trait_predicate,
32603256 None ,
32613257 obligation. cause . body_id ,
32623258 ) ;
@@ -3271,7 +3267,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32713267 ) ;
32723268 } else if !suggested && !unsatisfied_const {
32733269 // Can't show anything else useful, try to find similar impls.
3274- let impl_candidates = self . find_similar_impl_candidates ( * trait_predicate) ;
3270+ let impl_candidates = self . find_similar_impl_candidates ( trait_predicate) ;
32753271 if !self . report_similar_impl_candidates (
32763272 & impl_candidates,
32773273 trait_predicate. to_poly_trait_ref ( ) ,
@@ -3282,7 +3278,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
32823278 ) {
32833279 self . report_similar_impl_candidates_for_root_obligation (
32843280 obligation,
3285- * trait_predicate,
3281+ trait_predicate,
32863282 body_def_id,
32873283 err,
32883284 ) ;
@@ -3356,7 +3352,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
33563352
33573353 fn maybe_add_note_for_unsatisfied_const (
33583354 & self ,
3359- _trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3355+ _trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
33603356 _err : & mut Diag < ' _ > ,
33613357 _span : Span ,
33623358 ) -> UnsatisfiedConst {
0 commit comments