Skip to content

Commit

Permalink
Replace vec![] calls with slice literals
Browse files Browse the repository at this point in the history
There is no need to create vec's here
  • Loading branch information
est31 committed Feb 17, 2021
1 parent 42a4673 commit c5b9264
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_llvm/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5b9264

Please sign in to comment.