@@ -530,7 +530,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
530
530
} ;
531
531
532
532
let err_msg = self . get_standard_error_message (
533
- & main_trait_predicate,
533
+ main_trait_predicate,
534
534
message,
535
535
predicate_is_const,
536
536
append_const_msg,
@@ -601,7 +601,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
601
601
let explanation = get_explanation_based_on_obligation (
602
602
self . tcx ,
603
603
& obligation,
604
- & main_trait_predicate ,
604
+ trait_predicate ,
605
605
pre_message,
606
606
) ;
607
607
@@ -652,7 +652,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
652
652
653
653
let UnsatisfiedConst ( unsatisfied_const) = self
654
654
. maybe_add_note_for_unsatisfied_const (
655
- & trait_predicate,
655
+ trait_predicate,
656
656
& mut err,
657
657
span,
658
658
) ;
@@ -669,7 +669,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
669
669
err. span_label ( tcx. def_span ( body) , s) ;
670
670
}
671
671
672
- self . suggest_floating_point_literal ( & obligation, & mut err, & main_trait_ref) ;
672
+ self . suggest_floating_point_literal ( & obligation, & mut err, main_trait_ref) ;
673
673
self . suggest_dereferencing_index ( & obligation, & mut err, trait_predicate) ;
674
674
suggested |= self . suggest_dereferences ( & obligation, & mut err, trait_predicate) ;
675
675
suggested |= self . suggest_fn_call ( & obligation, & mut err, trait_predicate) ;
@@ -704,7 +704,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
704
704
span,
705
705
trait_predicate,
706
706
) ;
707
- self . note_version_mismatch ( & mut err, & main_trait_ref) ;
707
+ self . note_version_mismatch ( & mut err, main_trait_ref) ;
708
708
self . suggest_remove_await ( & obligation, & mut err) ;
709
709
self . suggest_derive ( & obligation, & mut err, trait_predicate) ;
710
710
@@ -752,7 +752,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
752
752
753
753
self . try_to_add_help_message (
754
754
& obligation,
755
- & main_trait_predicate,
755
+ main_trait_predicate,
756
756
& mut err,
757
757
span,
758
758
is_fn_trait,
@@ -2224,11 +2224,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
2224
2224
/// If the `Self` type of the unsatisfied trait `trait_ref` implements a trait
2225
2225
/// with the same path as `trait_ref`, a help message about
2226
2226
/// a probable version mismatch is added to `err`
2227
- fn note_version_mismatch (
2228
- & self ,
2229
- err : & mut Diag < ' _ > ,
2230
- trait_ref : & ty:: PolyTraitRef < ' tcx > ,
2231
- ) -> bool {
2227
+ fn note_version_mismatch ( & self , err : & mut Diag < ' _ > , trait_ref : ty:: PolyTraitRef < ' tcx > ) -> bool {
2232
2228
let get_trait_impls = |trait_def_id| {
2233
2229
let mut trait_impls = vec ! [ ] ;
2234
2230
self . tcx . for_each_relevant_impl (
@@ -3032,7 +3028,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3032
3028
3033
3029
fn get_standard_error_message (
3034
3030
& self ,
3035
- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3031
+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3036
3032
message : Option < String > ,
3037
3033
predicate_is_const : bool ,
3038
3034
append_const_msg : Option < AppendConstMessage > ,
@@ -3203,7 +3199,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3203
3199
fn try_to_add_help_message (
3204
3200
& self ,
3205
3201
obligation : & PredicateObligation < ' tcx > ,
3206
- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3202
+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3207
3203
err : & mut Diag < ' _ > ,
3208
3204
span : Span ,
3209
3205
is_fn_trait : bool ,
@@ -3235,7 +3231,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3235
3231
params,
3236
3232
) ;
3237
3233
} else if !trait_predicate. has_non_region_infer ( )
3238
- && self . predicate_can_apply ( obligation. param_env , * trait_predicate)
3234
+ && self . predicate_can_apply ( obligation. param_env , trait_predicate)
3239
3235
{
3240
3236
// If a where-clause may be useful, remind the
3241
3237
// user that they can add it.
@@ -3246,7 +3242,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3246
3242
// which is somewhat confusing.
3247
3243
self . suggest_restricting_param_bound (
3248
3244
err,
3249
- * trait_predicate,
3245
+ trait_predicate,
3250
3246
None ,
3251
3247
obligation. cause . body_id ,
3252
3248
) ;
@@ -3261,7 +3257,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3261
3257
) ;
3262
3258
} else if !suggested && !unsatisfied_const {
3263
3259
// Can't show anything else useful, try to find similar impls.
3264
- let impl_candidates = self . find_similar_impl_candidates ( * trait_predicate) ;
3260
+ let impl_candidates = self . find_similar_impl_candidates ( trait_predicate) ;
3265
3261
if !self . report_similar_impl_candidates (
3266
3262
& impl_candidates,
3267
3263
trait_predicate. to_poly_trait_ref ( ) ,
@@ -3272,7 +3268,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3272
3268
) {
3273
3269
self . report_similar_impl_candidates_for_root_obligation (
3274
3270
obligation,
3275
- * trait_predicate,
3271
+ trait_predicate,
3276
3272
body_def_id,
3277
3273
err,
3278
3274
) ;
@@ -3346,7 +3342,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3346
3342
3347
3343
fn maybe_add_note_for_unsatisfied_const (
3348
3344
& self ,
3349
- _trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3345
+ _trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3350
3346
_err : & mut Diag < ' _ > ,
3351
3347
_span : Span ,
3352
3348
) -> UnsatisfiedConst {
0 commit comments