@@ -532,7 +532,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
532
532
} ;
533
533
534
534
let err_msg = self . get_standard_error_message (
535
- & main_trait_predicate,
535
+ main_trait_predicate,
536
536
message,
537
537
predicate_is_const,
538
538
append_const_msg,
@@ -603,7 +603,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
603
603
let explanation = get_explanation_based_on_obligation (
604
604
self . tcx ,
605
605
& obligation,
606
- & leaf_trait_predicate,
606
+ leaf_trait_predicate,
607
607
pre_message,
608
608
) ;
609
609
@@ -654,7 +654,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
654
654
655
655
let UnsatisfiedConst ( unsatisfied_const) = self
656
656
. maybe_add_note_for_unsatisfied_const (
657
- & leaf_trait_predicate,
657
+ leaf_trait_predicate,
658
658
& mut err,
659
659
span,
660
660
) ;
@@ -671,7 +671,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
671
671
err. span_label ( tcx. def_span ( body) , s) ;
672
672
}
673
673
674
- self . suggest_floating_point_literal ( & obligation, & mut err, & leaf_trait_ref) ;
674
+ self . suggest_floating_point_literal ( & obligation, & mut err, leaf_trait_ref) ;
675
675
self . suggest_dereferencing_index ( & obligation, & mut err, leaf_trait_predicate) ;
676
676
suggested |= self . suggest_dereferences ( & obligation, & mut err, leaf_trait_predicate) ;
677
677
suggested |= self . suggest_fn_call ( & obligation, & mut err, leaf_trait_predicate) ;
@@ -706,7 +706,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
706
706
span,
707
707
leaf_trait_predicate,
708
708
) ;
709
- self . note_version_mismatch ( & mut err, & leaf_trait_ref) ;
709
+ self . note_version_mismatch ( & mut err, leaf_trait_ref) ;
710
710
self . suggest_remove_await ( & obligation, & mut err) ;
711
711
self . suggest_derive ( & obligation, & mut err, leaf_trait_predicate) ;
712
712
@@ -754,7 +754,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
754
754
755
755
self . try_to_add_help_message (
756
756
& obligation,
757
- & leaf_trait_predicate,
757
+ leaf_trait_predicate,
758
758
& mut err,
759
759
span,
760
760
is_fn_trait,
@@ -2226,11 +2226,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
2226
2226
/// If the `Self` type of the unsatisfied trait `trait_ref` implements a trait
2227
2227
/// with the same path as `trait_ref`, a help message about
2228
2228
/// 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 {
2234
2230
let get_trait_impls = |trait_def_id| {
2235
2231
let mut trait_impls = vec ! [ ] ;
2236
2232
self . tcx . for_each_relevant_impl (
@@ -3034,7 +3030,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3034
3030
3035
3031
fn get_standard_error_message (
3036
3032
& self ,
3037
- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3033
+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3038
3034
message : Option < String > ,
3039
3035
predicate_is_const : bool ,
3040
3036
append_const_msg : Option < AppendConstMessage > ,
@@ -3205,7 +3201,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3205
3201
fn try_to_add_help_message (
3206
3202
& self ,
3207
3203
obligation : & PredicateObligation < ' tcx > ,
3208
- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3204
+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3209
3205
err : & mut Diag < ' _ > ,
3210
3206
span : Span ,
3211
3207
is_fn_trait : bool ,
@@ -3237,7 +3233,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3237
3233
params,
3238
3234
) ;
3239
3235
} 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)
3241
3237
{
3242
3238
// If a where-clause may be useful, remind the
3243
3239
// user that they can add it.
@@ -3248,7 +3244,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3248
3244
// which is somewhat confusing.
3249
3245
self . suggest_restricting_param_bound (
3250
3246
err,
3251
- * trait_predicate,
3247
+ trait_predicate,
3252
3248
None ,
3253
3249
obligation. cause . body_id ,
3254
3250
) ;
@@ -3263,7 +3259,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3263
3259
) ;
3264
3260
} else if !suggested && !unsatisfied_const {
3265
3261
// 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) ;
3267
3263
if !self . report_similar_impl_candidates (
3268
3264
& impl_candidates,
3269
3265
trait_predicate. to_poly_trait_ref ( ) ,
@@ -3274,7 +3270,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3274
3270
) {
3275
3271
self . report_similar_impl_candidates_for_root_obligation (
3276
3272
obligation,
3277
- * trait_predicate,
3273
+ trait_predicate,
3278
3274
body_def_id,
3279
3275
err,
3280
3276
) ;
@@ -3348,7 +3344,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3348
3344
3349
3345
fn maybe_add_note_for_unsatisfied_const (
3350
3346
& self ,
3351
- _trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3347
+ _trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3352
3348
_err : & mut Diag < ' _ > ,
3353
3349
_span : Span ,
3354
3350
) -> UnsatisfiedConst {
0 commit comments