]> git.lizzy.rs Git - rust.git/commitdiff
Drop migration lint for Send/Sync bound in LTO backend
authorMark Rousskov <mark.simulacrum@gmail.com>
Sun, 19 Sep 2021 17:13:16 +0000 (13:13 -0400)
committerMark Rousskov <mark.simulacrum@gmail.com>
Tue, 21 Sep 2021 02:21:43 +0000 (22:21 -0400)
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

index fcb79c8332c1e3207e52d4ddd128fbd7aea98860..f612785e5a416c582321e4efa0b7c1aec41e91b6 100644 (file)
@@ -906,11 +906,8 @@ fn from_thin_lto_modules(
     ) -> 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)