@@ -28,7 +28,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
28
28
29
29
match err {
30
30
ArgumentSorts ( values, _) | Sorts ( values) => {
31
- match ( values. expected . kind ( ) , values. found . kind ( ) ) {
31
+ match ( * values. expected . kind ( ) , * values. found . kind ( ) ) {
32
32
( ty:: Closure ( ..) , ty:: Closure ( ..) ) => {
33
33
diag. note ( "no two closures, even if identical, have the same type" ) ;
34
34
diag. help ( "consider boxing your closure and/or using it as a trait object" ) ;
@@ -452,7 +452,7 @@ impl<T> Trait<T> for X {
452
452
}
453
453
( ty:: FnPtr ( sig) , ty:: FnDef ( def_id, _) )
454
454
| ( ty:: FnDef ( def_id, _) , ty:: FnPtr ( sig) ) => {
455
- if tcx. fn_sig ( * def_id) . skip_binder ( ) . unsafety ( ) < sig. unsafety ( ) {
455
+ if tcx. fn_sig ( def_id) . skip_binder ( ) . unsafety ( ) < sig. unsafety ( ) {
456
456
diag. note (
457
457
"unsafe functions cannot be coerced into safe function pointers" ,
458
458
) ;
@@ -527,7 +527,7 @@ impl<T> Trait<T> for X {
527
527
diag : & mut Diag < ' _ > ,
528
528
msg : impl Fn ( ) -> String ,
529
529
body_owner_def_id : DefId ,
530
- proj_ty : & ty:: AliasTy < ' tcx > ,
530
+ proj_ty : ty:: AliasTy < ' tcx > ,
531
531
ty : Ty < ' tcx > ,
532
532
) -> bool {
533
533
let tcx = self . tcx ;
@@ -541,7 +541,7 @@ impl<T> Trait<T> for X {
541
541
} ;
542
542
// Get the `DefId` for the type parameter corresponding to `A` in `<A as T>::Foo`.
543
543
// This will also work for `impl Trait`.
544
- let ty:: Param ( param_ty) = proj_ty. self_ty ( ) . kind ( ) else {
544
+ let ty:: Param ( param_ty) = * proj_ty. self_ty ( ) . kind ( ) else {
545
545
return false ;
546
546
} ;
547
547
let generics = tcx. generics_of ( body_owner_def_id) ;
@@ -598,7 +598,7 @@ impl<T> Trait<T> for X {
598
598
fn expected_projection (
599
599
& self ,
600
600
diag : & mut Diag < ' _ > ,
601
- proj_ty : & ty:: AliasTy < ' tcx > ,
601
+ proj_ty : ty:: AliasTy < ' tcx > ,
602
602
values : ExpectedFound < Ty < ' tcx > > ,
603
603
body_owner_def_id : DefId ,
604
604
cause_code : & ObligationCauseCode < ' _ > ,
@@ -709,7 +709,7 @@ fn foo(&self) -> Self::T { String::new() }
709
709
& self ,
710
710
diag : & mut Diag < ' _ > ,
711
711
msg : impl Fn ( ) -> String ,
712
- proj_ty : & ty:: AliasTy < ' tcx > ,
712
+ proj_ty : ty:: AliasTy < ' tcx > ,
713
713
ty : Ty < ' tcx > ,
714
714
) -> bool {
715
715
let tcx = self . tcx ;
0 commit comments