about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-02-25 15:15:59 +0000
committerbors <bors@rust-lang.org>2021-02-25 15:15:59 +0000
commit0ab7c1d56f92ebc3c456a0c7c502ba1593e76f8c (patch)
tree1af0a73349d46b0054f052aba2b53ec03a50e0ca /compiler/rustc_codegen_llvm/src
parentb36f77012dcbfbcf7d04e29fb9a10c8ead9b3ab1 (diff)
parentebe67d98103717518904950a7a2008dd909d5f92 (diff)
downloadrust-0ab7c1d56f92ebc3c456a0c7c502ba1593e76f8c.tar.gz
rust-0ab7c1d56f92ebc3c456a0c7c502ba1593e76f8c.zip
Auto merge of #82517 - Dylan-DPC:rollup-a1958gb, r=Dylan-DPC
Rollup of 16 pull requests

Successful merges:

 - #75807 (Convert core/num/mod.rs to intra-doc links)
 - #80534 (Use #[doc = include_str!()] in std)
 - #80553 (Add an impl of Error on `Arc<impl Error>`.)
 - #81167 (Make ptr::write const)
 - #81575 (rustdoc: Name fields of `ResolutionFailure::WrongNamespace`)
 - #81713 (Account for associated consts in the "unstable assoc item name colission" lint)
 - #82078 (Make char and u8 methods const)
 - #82087 (Fix ICE caused by suggestion with no code substitutions)
 - #82090 (Do not consider using a semicolon inside of a different-crate macro)
 - #82213 (Slices for vecs)
 - #82214 (Remove redundant to_string calls)
 - #82220 (fix the false 'defined here' messages)
 - #82313 (Update normalize.css to 8.0.1)
 - #82321 (AST: Remove some unnecessary boxes)
 - #82364 (Improve error msgs when found type is deref of expected)
 - #82514 (Update Clippy)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/allocator.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/asm.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/allocator.rs b/compiler/rustc_codegen_llvm/src/allocator.rs
index a5ea0b2a74c..068e5e99efe 100644
--- a/compiler/rustc_codegen_llvm/src/allocator.rs
+++ b/compiler/rustc_codegen_llvm/src/allocator.rs
@@ -93,7 +93,7 @@ pub(crate) unsafe fn codegen(
     let args = [usize, usize]; // size, align
 
     let ty = llvm::LLVMFunctionType(void, args.as_ptr(), args.len() as c_uint, False);
-    let name = "__rust_alloc_error_handler".to_string();
+    let name = "__rust_alloc_error_handler";
     let llfn = llvm::LLVMRustGetOrInsertFunction(llmod, name.as_ptr().cast(), name.len(), ty);
     // -> ! DIFlagNoReturn
     llvm::Attribute::NoReturn.apply_llfn(llvm::AttributePlace::Function, llfn);
diff --git a/compiler/rustc_codegen_llvm/src/asm.rs b/compiler/rustc_codegen_llvm/src/asm.rs
index 4aa25aae747..26815de403f 100644
--- a/compiler/rustc_codegen_llvm/src/asm.rs
+++ b/compiler/rustc_codegen_llvm/src/asm.rs
@@ -61,9 +61,9 @@ impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
         // Default per-arch clobbers
         // Basically what clang does
         let arch_clobbers = match &self.sess().target.arch[..] {
-            "x86" | "x86_64" => vec!["~{dirflag}", "~{fpsr}", "~{flags}"],
-            "mips" | "mips64" => vec!["~{$1}"],
-            _ => Vec::new(),
+            "x86" | "x86_64" => &["~{dirflag}", "~{fpsr}", "~{flags}"][..],
+            "mips" | "mips64" => &["~{$1}"],
+            _ => &[],
         };
 
         let all_constraints = ia