diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-09-18 17:37:24 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-09-20 08:45:39 -0400 |
| commit | 45b989a03319c6a53bb726ec98dfe7d172035ac6 (patch) | |
| tree | 072c2bea54d0a91860739ab5aa5e3293a3d9c66a /compiler/rustc_codegen_llvm | |
| parent | 5e1a614b5369c430a383beaf1aec04f09740edbb (diff) | |
| download | rust-45b989a03319c6a53bb726ec98dfe7d172035ac6.tar.gz rust-45b989a03319c6a53bb726ec98dfe7d172035ac6.zip | |
Enable 2021 compatibility lints for all in-tree code
This just applies the suggested fixes from the compatibility warnings, leaving any that are in practice spurious in. This is primarily intended to provide a starting point to identify possible fixes to the migrations (e.g., by avoiding spurious warnings). A secondary commit cleans these up where they are false positives (as is true in many of the cases).
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/lto.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs index f612785e5a4..fcb79c8332c 100644 --- a/compiler/rustc_codegen_llvm/src/back/lto.rs +++ b/compiler/rustc_codegen_llvm/src/back/lto.rs @@ -906,8 +906,11 @@ impl ThinLTOKeysMap { ) -> Self { let keys = iter::zip(modules, names) .map(|(module, name)| { - let key = build_string(|rust_str| unsafe { - llvm::LLVMRustComputeLTOCacheKey(rust_str, module.identifier, data.0); + let key = build_string(|rust_str| { + let _ = &data; + unsafe { + llvm::LLVMRustComputeLTOCacheKey(rust_str, module.identifier, data.0); + } }) .expect("Invalid ThinLTO module key"); (name.clone().into_string().unwrap(), key) |
