Avoid taking reference of &TyKind

This commit is contained in:
Michael Goulet 2024-08-25 16:02:11 -04:00
parent 89103466d7
commit 48f43fa0ed
14 changed files with 18 additions and 18 deletions

View file

@ -382,7 +382,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
if !expected_inner.is_fn() || !found_inner.is_fn() {
return;
}
match (&expected_inner.kind(), &found_inner.kind()) {
match (expected_inner.kind(), found_inner.kind()) {
(ty::FnPtr(sig_tys, hdr), ty::FnDef(did, args)) => {
let sig = sig_tys.with(*hdr);
let expected_sig = &(self.normalize_fn_sig)(sig);