diff options
| author | bors <bors@rust-lang.org> | 2021-11-05 09:17:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-11-05 09:17:39 +0000 |
| commit | 489ec310d2eadbdbdafc172fb09e9d598c01c93e (patch) | |
| tree | fe443ad481b38cbbbf8026831b52a5db11348e8c /compiler/rustc_codegen_ssa/src | |
| parent | b99bd8f8be49ba9676d3274fdbd06b2d476adfcd (diff) | |
| parent | 28ef4169ccc62f3f1a35b6b002c29ea9bc6b2334 (diff) | |
| download | rust-489ec310d2eadbdbdafc172fb09e9d598c01c93e.tar.gz rust-489ec310d2eadbdbdafc172fb09e9d598c01c93e.zip | |
Auto merge of #90577 - matthiaskrgr:clippy_perf_nov, r=petrochenkov
clippy::perf fixes
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/block.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 297dcde99b3..a9471f7b771 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -832,7 +832,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // FIXME(rcvalle): Add support for generalized identifiers. // FIXME(rcvalle): Create distinct unnamed MDNodes for internal identifiers. let typeid = typeid_for_fnabi(bx.tcx(), fn_abi); - let typeid_metadata = bx.typeid_metadata(typeid.clone()); + let typeid_metadata = bx.typeid_metadata(typeid); // Test whether the function pointer is associated with the type identifier. let cond = bx.type_test(fn_ptr, typeid_metadata); diff --git a/compiler/rustc_codegen_ssa/src/mir/mod.rs b/compiler/rustc_codegen_ssa/src/mir/mod.rs index 1cd400eecfb..1ef863e84af 100644 --- a/compiler/rustc_codegen_ssa/src/mir/mod.rs +++ b/compiler/rustc_codegen_ssa/src/mir/mod.rs @@ -250,7 +250,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( // is associated with a type identifier). if cx.tcx().sess.is_sanitizer_cfi_enabled() { let typeid = typeid_for_fnabi(cx.tcx(), fn_abi); - bx.type_metadata(llfn, typeid.clone()); + bx.type_metadata(llfn, typeid); } } |
