From 5e344da2170da48f6fe7ba28770b11b00796fa5f Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sun, 19 Sep 2021 13:13:16 -0400 Subject: [PATCH] Drop migration lint for Send/Sync bound in LTO backend The closure in question does not require Send/Sync impls, so it's OK to lose them when we just capture data.0. --- compiler/rustc_codegen_llvm/src/back/lto.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs index fcb79c8332c..f612785e5a4 100644 --- a/compiler/rustc_codegen_llvm/src/back/lto.rs +++ b/compiler/rustc_codegen_llvm/src/back/lto.rs @@ -906,11 +906,8 @@ impl ThinLTOKeysMap { ) -> Self { let keys = iter::zip(modules, names) .map(|(module, name)| { - let key = build_string(|rust_str| { - let _ = &data; - unsafe { - llvm::LLVMRustComputeLTOCacheKey(rust_str, module.identifier, data.0); - } + let key = build_string(|rust_str| unsafe { + llvm::LLVMRustComputeLTOCacheKey(rust_str, module.identifier, data.0); }) .expect("Invalid ThinLTO module key"); (name.clone().into_string().unwrap(), key)