1
Fork 0

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:
Matthias Krüger 2022-06-29 20:35:07 +02:00 committed by GitHub
commit d34c4ca9be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 38 additions and 66 deletions

View file

@ -947,7 +947,7 @@ fn adt_defined_here<'p, 'tcx>(
span.push_span_label(def_span, String::new());
for pat in spans {
span.push_span_label(pat, "not covered".to_string());
span.push_span_label(pat, "not covered");
}
err.span_note(span, &format!("`{}` defined here", ty));
}