@@ -28,7 +28,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
2828
2929 match err {
3030 ArgumentSorts ( values, _) | Sorts ( values) => {
31- match ( values. expected . kind ( ) , values. found . kind ( ) ) {
31+ match ( * values. expected . kind ( ) , * values. found . kind ( ) ) {
3232 ( ty:: Closure ( ..) , ty:: Closure ( ..) ) => {
3333 diag. note ( "no two closures, even if identical, have the same type" ) ;
3434 diag. help ( "consider boxing your closure and/or using it as a trait object" ) ;
@@ -452,7 +452,7 @@ impl<T> Trait<T> for X {
452452 }
453453 ( ty:: FnPtr ( sig) , ty:: FnDef ( def_id, _) )
454454 | ( 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 ( ) {
456456 diag. note (
457457 "unsafe functions cannot be coerced into safe function pointers" ,
458458 ) ;
@@ -527,7 +527,7 @@ impl<T> Trait<T> for X {
527527 diag : & mut Diag < ' _ > ,
528528 msg : impl Fn ( ) -> String ,
529529 body_owner_def_id : DefId ,
530- proj_ty : & ty:: AliasTy < ' tcx > ,
530+ proj_ty : ty:: AliasTy < ' tcx > ,
531531 ty : Ty < ' tcx > ,
532532 ) -> bool {
533533 let tcx = self . tcx ;
@@ -541,7 +541,7 @@ impl<T> Trait<T> for X {
541541 } ;
542542 // Get the `DefId` for the type parameter corresponding to `A` in `<A as T>::Foo`.
543543 // 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 {
545545 return false ;
546546 } ;
547547 let generics = tcx. generics_of ( body_owner_def_id) ;
@@ -598,7 +598,7 @@ impl<T> Trait<T> for X {
598598 fn expected_projection (
599599 & self ,
600600 diag : & mut Diag < ' _ > ,
601- proj_ty : & ty:: AliasTy < ' tcx > ,
601+ proj_ty : ty:: AliasTy < ' tcx > ,
602602 values : ExpectedFound < Ty < ' tcx > > ,
603603 body_owner_def_id : DefId ,
604604 cause_code : & ObligationCauseCode < ' _ > ,
@@ -709,7 +709,7 @@ fn foo(&self) -> Self::T { String::new() }
709709 & self ,
710710 diag : & mut Diag < ' _ > ,
711711 msg : impl Fn ( ) -> String ,
712- proj_ty : & ty:: AliasTy < ' tcx > ,
712+ proj_ty : ty:: AliasTy < ' tcx > ,
713713 ty : Ty < ' tcx > ,
714714 ) -> bool {
715715 let tcx = self . tcx ;
0 commit comments