summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/declare.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-03-25 13:58:33 -0400
committerMichael Goulet <michael@errs.io>2024-03-25 13:58:40 -0400
commit99fbc6f8efd4f30b571485c9e3aae391aefedeba (patch)
tree1e2a2f74e0b21d1ca248138007464e5c15aac7d0 /compiler/rustc_codegen_llvm/src/declare.rs
parentcb7c63606e53715f94f3ba04d38e50772e4cd23d (diff)
downloadrust-99fbc6f8efd4f30b571485c9e3aae391aefedeba.tar.gz
rust-99fbc6f8efd4f30b571485c9e3aae391aefedeba.zip
Instance is Copy
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/declare.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/declare.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_llvm/src/declare.rs b/compiler/rustc_codegen_llvm/src/declare.rs
index 78c0725a637..1a2498c75a7 100644
--- a/compiler/rustc_codegen_llvm/src/declare.rs
+++ b/compiler/rustc_codegen_llvm/src/declare.rs
@@ -141,17 +141,17 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
 
         if self.tcx.sess.is_sanitizer_cfi_enabled() {
             if let Some(instance) = instance {
-                let typeid = typeid_for_instance(self.tcx, &instance, TypeIdOptions::empty());
+                let typeid = typeid_for_instance(self.tcx, instance, TypeIdOptions::empty());
                 self.set_type_metadata(llfn, typeid);
                 let typeid =
-                    typeid_for_instance(self.tcx, &instance, TypeIdOptions::GENERALIZE_POINTERS);
+                    typeid_for_instance(self.tcx, instance, TypeIdOptions::GENERALIZE_POINTERS);
                 self.add_type_metadata(llfn, typeid);
                 let typeid =
-                    typeid_for_instance(self.tcx, &instance, TypeIdOptions::NORMALIZE_INTEGERS);
+                    typeid_for_instance(self.tcx, instance, TypeIdOptions::NORMALIZE_INTEGERS);
                 self.add_type_metadata(llfn, typeid);
                 let typeid = typeid_for_instance(
                     self.tcx,
-                    &instance,
+                    instance,
                     TypeIdOptions::GENERALIZE_POINTERS | TypeIdOptions::NORMALIZE_INTEGERS,
                 );
                 self.add_type_metadata(llfn, typeid);
@@ -182,7 +182,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
             }
 
             if let Some(instance) = instance {
-                let kcfi_typeid = kcfi_typeid_for_instance(self.tcx, &instance, options);
+                let kcfi_typeid = kcfi_typeid_for_instance(self.tcx, instance, options);
                 self.set_kcfi_type_metadata(llfn, kcfi_typeid);
             } else {
                 let kcfi_typeid = kcfi_typeid_for_fnabi(self.tcx, fn_abi, options);