about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-08-25 16:02:11 -0400
committerMichael Goulet <michael@errs.io>2024-08-25 16:02:29 -0400
commit48f43fa0ed2f2e4ff2d9d53b9d72cfbc108a9034 (patch)
tree26b26bdc8f2c75b6343e3194409a7c9a16e64cb4 /compiler/rustc_trait_selection/src
parent89103466d77a3ae068bab0fd17c53bf7104f627b (diff)
downloadrust-48f43fa0ed2f2e4ff2d9d53b9d72cfbc108a9034.tar.gz
rust-48f43fa0ed2f2e4ff2d9d53b9d72cfbc108a9034.zip
Avoid taking reference of &TyKind
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/error_reporting/infer/suggest.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/suggest.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/suggest.rs
index 35f68a56d2d..ba656493d46 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/infer/suggest.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/infer/suggest.rs
@@ -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);