Skip to content

Commit c5b9264

Browse files
committed
Replace vec![] calls with slice literals
There is no need to create vec's here
1 parent 42a4673 commit c5b9264

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_codegen_llvm/src

1 file changed

+3
-3
lines changed

compiler/rustc_codegen_llvm/src/asm.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
6161
// Default per-arch clobbers
6262
// Basically what clang does
6363
let arch_clobbers = match &self.sess().target.arch[..] {
64-
"x86" | "x86_64" => vec!["~{dirflag}", "~{fpsr}", "~{flags}"],
65-
"mips" | "mips64" => vec!["~{$1}"],
66-
_ => Vec::new(),
64+
"x86" | "x86_64" => &["~{dirflag}", "~{fpsr}", "~{flags}"][..],
65+
"mips" | "mips64" => &["~{$1}"],
66+
_ => &[],
6767
};
6868

6969
let all_constraints = ia

0 commit comments

Comments
 (0)