Skip to content

Commit abbd34d

Browse files
committed
avoid &str to String conversions
1 parent 93ab13b commit abbd34d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_typeck/src/check/coercion.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1589,11 +1589,11 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
15891589
) {
15901590
let hir::ExprKind::Loop(_, _, _, loop_span) = expr.kind else { return;};
15911591
let mut span: MultiSpan = vec![loop_span].into();
1592-
span.push_span_label(loop_span, "this might have zero elements to iterate on".to_string());
1592+
span.push_span_label(loop_span, "this might have zero elements to iterate on");
15931593
for ret_expr in ret_exprs {
15941594
span.push_span_label(
15951595
ret_expr.span,
1596-
"if the loop doesn't execute, this value would never get returned".to_string(),
1596+
"if the loop doesn't execute, this value would never get returned",
15971597
);
15981598
}
15991599
err.span_note(

0 commit comments

Comments
 (0)