diff options
| author | est31 <MTest31@outlook.com> | 2021-02-17 10:22:29 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2021-02-17 10:37:47 +0100 |
| commit | c5b92649291d43a93ccd11f61557d7ae77651512 (patch) | |
| tree | f67a31e7899371ed1ca9b4a19dd9d10e9aace7f5 /compiler/rustc_codegen_llvm/src | |
| parent | 42a4673fbd40b09a99d057eaa9b3e5579b54c184 (diff) | |
| download | rust-c5b92649291d43a93ccd11f61557d7ae77651512.tar.gz rust-c5b92649291d43a93ccd11f61557d7ae77651512.zip | |
Replace vec![] calls with slice literals
There is no need to create vec's here
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/asm.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
