avoid many &str
to String
conversions with MultiSpan::push_span_label
This commit is contained in:
parent
0e1a6fb463
commit
6212e6b339
17 changed files with 38 additions and 66 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue