1
Fork 0

avoid many &str to String conversions with MultiSpan::push_span_label

This commit is contained in:
Takayuki Maeda 2022-06-29 21:16:43 +09:00
parent 0e1a6fb463
commit 6212e6b339
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));
}