about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-03-14 09:02:45 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-03-14 09:45:41 +1100
commit79e4be1e9f1bd8032f3573a8f44f88814632a342 (patch)
tree3471f9563b94b7c88ba194861dc416c1ffca4ef3
parentbebd91feb32667b6a1bb7a11da91ab8a935b4c24 (diff)
downloadrust-79e4be1e9f1bd8032f3573a8f44f88814632a342.tar.gz
rust-79e4be1e9f1bd8032f3573a8f44f88814632a342.zip
Remove the ref from `FnParam::Ident`.
-rw-r--r--compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
index 0a472c95221..96d0a0fc6de 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
@@ -2679,7 +2679,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                     params.get(is_method as usize..params.len() - sig.decl.c_variadic as usize)?;
                 debug_assert_eq!(params.len(), fn_inputs.len());
                 Some((
-                    fn_inputs.zip(params.iter().map(|param| FnParam::Name(param))).collect(),
+                    fn_inputs.zip(params.iter().map(|&param| FnParam::Name(param))).collect(),
                     generics,
                 ))
             }
@@ -2710,7 +2710,7 @@ impl<'tcx> Visitor<'tcx> for FindClosureArg<'tcx> {
 #[derive(Clone, Copy)]
 enum FnParam<'hir> {
     Param(&'hir hir::Param<'hir>),
-    Name(&'hir Ident),
+    Name(Ident),
 }
 
 impl FnParam<'_> {