avoid many &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