summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/context.rs
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-10-26 21:02:48 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-10-30 10:13:39 -0400
commit57c6ed0c07aaea9c89a192e54b3274464ebe6fbf (patch)
tree98a2c0310690cf0c09851cb5a12a99264bbbf522 /compiler/rustc_codegen_llvm/src/context.rs
parentbfecb18771aa0249efe05dd7c35fa232f180bb70 (diff)
downloadrust-57c6ed0c07aaea9c89a192e54b3274464ebe6fbf.tar.gz
rust-57c6ed0c07aaea9c89a192e54b3274464ebe6fbf.zip
Fix even more clippy warnings
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index 56ff580b43b..253e02bd082 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -122,10 +122,10 @@ pub unsafe fn create_module(
     if llvm_util::get_major_version() < 9 {
         target_data_layout = strip_function_ptr_alignment(target_data_layout);
     }
-    if llvm_util::get_major_version() < 10 {
-        if sess.target.arch == "x86" || sess.target.arch == "x86_64" {
-            target_data_layout = strip_x86_address_spaces(target_data_layout);
-        }
+    if llvm_util::get_major_version() < 10
+        && (sess.target.arch == "x86" || sess.target.arch == "x86_64")
+    {
+        target_data_layout = strip_x86_address_spaces(target_data_layout);
     }
 
     // Ensure the data-layout values hardcoded remain the defaults.
@@ -864,7 +864,7 @@ impl<'b, 'tcx> CodegenCx<'b, 'tcx> {
         // user defined names
         let mut name = String::with_capacity(prefix.len() + 6);
         name.push_str(prefix);
-        name.push_str(".");
+        name.push('.');
         base_n::push_str(idx as u128, base_n::ALPHANUMERIC_ONLY, &mut name);
         name
     }