@@ -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
@@ -658,7 +658,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
658
658
659
659
let UnsatisfiedConst ( unsatisfied_const) = self
660
660
. maybe_add_note_for_unsatisfied_const (
661
- & leaf_trait_predicate,
661
+ leaf_trait_predicate,
662
662
& mut err,
663
663
span,
664
664
) ;
@@ -675,7 +675,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
675
675
err. span_label ( tcx. def_span ( body) , s) ;
676
676
}
677
677
678
- self . suggest_floating_point_literal ( & obligation, & mut err, & leaf_trait_ref) ;
678
+ self . suggest_floating_point_literal ( & obligation, & mut err, leaf_trait_ref) ;
679
679
self . suggest_dereferencing_index ( & obligation, & mut err, leaf_trait_predicate) ;
680
680
suggested |= self . suggest_dereferences ( & obligation, & mut err, leaf_trait_predicate) ;
681
681
suggested |= self . suggest_fn_call ( & obligation, & mut err, leaf_trait_predicate) ;
@@ -710,7 +710,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
710
710
span,
711
711
leaf_trait_predicate,
712
712
) ;
713
- self . note_version_mismatch ( & mut err, & leaf_trait_ref) ;
713
+ self . note_version_mismatch ( & mut err, leaf_trait_ref) ;
714
714
self . suggest_remove_await ( & obligation, & mut err) ;
715
715
self . suggest_derive ( & obligation, & mut err, leaf_trait_predicate) ;
716
716
@@ -758,7 +758,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
758
758
759
759
self . try_to_add_help_message (
760
760
& obligation,
761
- & leaf_trait_predicate,
761
+ leaf_trait_predicate,
762
762
& mut err,
763
763
span,
764
764
is_fn_trait,
@@ -2234,11 +2234,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
2234
2234
/// If the `Self` type of the unsatisfied trait `trait_ref` implements a trait
2235
2235
/// with the same path as `trait_ref`, a help message about
2236
2236
/// 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 {
2242
2238
let get_trait_impls = |trait_def_id| {
2243
2239
let mut trait_impls = vec ! [ ] ;
2244
2240
self . tcx . for_each_relevant_impl (
@@ -3042,7 +3038,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3042
3038
3043
3039
fn get_standard_error_message (
3044
3040
& self ,
3045
- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3041
+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3046
3042
message : Option < String > ,
3047
3043
predicate_is_const : bool ,
3048
3044
append_const_msg : Option < AppendConstMessage > ,
@@ -3213,7 +3209,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3213
3209
fn try_to_add_help_message (
3214
3210
& self ,
3215
3211
obligation : & PredicateObligation < ' tcx > ,
3216
- trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3212
+ trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3217
3213
err : & mut Diag < ' _ > ,
3218
3214
span : Span ,
3219
3215
is_fn_trait : bool ,
@@ -3245,7 +3241,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3245
3241
params,
3246
3242
) ;
3247
3243
} 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)
3249
3245
{
3250
3246
// If a where-clause may be useful, remind the
3251
3247
// user that they can add it.
@@ -3256,7 +3252,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3256
3252
// which is somewhat confusing.
3257
3253
self . suggest_restricting_param_bound (
3258
3254
err,
3259
- * trait_predicate,
3255
+ trait_predicate,
3260
3256
None ,
3261
3257
obligation. cause . body_id ,
3262
3258
) ;
@@ -3271,7 +3267,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3271
3267
) ;
3272
3268
} else if !suggested && !unsatisfied_const {
3273
3269
// 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) ;
3275
3271
if !self . report_similar_impl_candidates (
3276
3272
& impl_candidates,
3277
3273
trait_predicate. to_poly_trait_ref ( ) ,
@@ -3282,7 +3278,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3282
3278
) {
3283
3279
self . report_similar_impl_candidates_for_root_obligation (
3284
3280
obligation,
3285
- * trait_predicate,
3281
+ trait_predicate,
3286
3282
body_def_id,
3287
3283
err,
3288
3284
) ;
@@ -3356,7 +3352,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
3356
3352
3357
3353
fn maybe_add_note_for_unsatisfied_const (
3358
3354
& self ,
3359
- _trait_predicate : & ty:: PolyTraitPredicate < ' tcx > ,
3355
+ _trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
3360
3356
_err : & mut Diag < ' _ > ,
3361
3357
_span : Span ,
3362
3358
) -> UnsatisfiedConst {
0 commit comments