1
Fork 0

Rollup merge of #105873 - matthiaskrgr:clippy_fmt, r=Nilstrieb

use &str / String literals instead of format!()
This commit is contained in:
Matthias Krüger 2022-12-18 23:03:07 +01:00 committed by GitHub
commit ebe3563764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 37 additions and 55 deletions

View file

@ -144,7 +144,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
// We prefer the latter because it matches the behavior of
// Clang.
if late && matches!(reg, InlineAsmRegOrRegClass::Reg(_)) {
constraints.push(format!("{}", reg_to_llvm(reg, Some(&in_value.layout))));
constraints.push(reg_to_llvm(reg, Some(&in_value.layout)).to_string());
} else {
constraints.push(format!("{}", op_idx[&idx]));
}