Rollup merge of #131626 - matthiaskrgr:dont_string, r=lqd
remove a couple of redundant String to String conversion
This commit is contained in:
commit
39071fdc58
4 changed files with 4 additions and 4 deletions
|
@ -706,7 +706,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
|
||||||
suggestions.push((
|
suggestions.push((
|
||||||
pat_span,
|
pat_span,
|
||||||
format!("consider removing the {to_remove}"),
|
format!("consider removing the {to_remove}"),
|
||||||
suggestion.to_string(),
|
suggestion,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
|
||||||
// We prefer the latter because it matches the behavior of
|
// We prefer the latter because it matches the behavior of
|
||||||
// Clang.
|
// Clang.
|
||||||
if late && matches!(reg, InlineAsmRegOrRegClass::Reg(_)) {
|
if late && matches!(reg, InlineAsmRegOrRegClass::Reg(_)) {
|
||||||
constraints.push(reg_to_llvm(reg, Some(&in_value.layout)).to_string());
|
constraints.push(reg_to_llvm(reg, Some(&in_value.layout)));
|
||||||
} else {
|
} else {
|
||||||
constraints.push(format!("{}", op_idx[&idx]));
|
constraints.push(format!("{}", op_idx[&idx]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,7 +325,7 @@ pub fn suggest_constraining_type_params<'a>(
|
||||||
let suggestion = if span_to_replace.is_some() {
|
let suggestion = if span_to_replace.is_some() {
|
||||||
constraint.clone()
|
constraint.clone()
|
||||||
} else if constraint.starts_with('<') {
|
} else if constraint.starts_with('<') {
|
||||||
constraint.to_string()
|
constraint.clone()
|
||||||
} else if bound_list_non_empty {
|
} else if bound_list_non_empty {
|
||||||
format!(" + {constraint}")
|
format!(" + {constraint}")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -137,7 +137,7 @@ pub fn extra_compiler_flags() -> Option<(Vec<String>, bool)> {
|
||||||
let content = if arg.len() == a.len() {
|
let content = if arg.len() == a.len() {
|
||||||
// A space-separated option, like `-C incremental=foo` or `--crate-type rlib`
|
// A space-separated option, like `-C incremental=foo` or `--crate-type rlib`
|
||||||
match args.next() {
|
match args.next() {
|
||||||
Some(arg) => arg.to_string(),
|
Some(arg) => arg,
|
||||||
None => continue,
|
None => continue,
|
||||||
}
|
}
|
||||||
} else if arg.get(a.len()..a.len() + 1) == Some("=") {
|
} else if arg.get(a.len()..a.len() + 1) == Some("=") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue