Rollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC
Avoid some `&str` to `String` conversions with `MultiSpan::push_span_label` This patch removes some`&str` to `String` conversions with `MultiSpan::push_span_label`.
This commit is contained in:
@@ -2204,8 +2204,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
||||
_ => true,
|
||||
};
|
||||
if !ident.span.overlaps(span) && !same_line {
|
||||
multispan
|
||||
.push_span_label(ident.span, "required by a bound in this".to_string());
|
||||
multispan.push_span_label(ident.span, "required by a bound in this");
|
||||
}
|
||||
}
|
||||
let descr = format!("required by a bound in `{}`", item_name);
|
||||
|
||||
Reference in New Issue
Block a user