Skip to content

Commit f65bf0b

Browse files
committed
avoid &str to String conversions
1 parent 5188bdb commit f65bf0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: compiler/rustc_resolve/src/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ impl<'a> Resolver<'a> {
508508
E0401,
509509
"can't use generic parameters from outer function",
510510
);
511-
err.span_label(span, "use of generic parameter from outer function".to_string());
511+
err.span_label(span, "use of generic parameter from outer function");
512512

513513
let sm = self.session.source_map();
514514
match outer_res {
@@ -990,7 +990,7 @@ impl<'a> Resolver<'a> {
990990
E0735,
991991
"generic parameters cannot use `Self` in their defaults"
992992
);
993-
err.span_label(span, "`Self` in generic parameter default".to_string());
993+
err.span_label(span, "`Self` in generic parameter default");
994994
err
995995
}
996996
ResolutionError::UnreachableLabel { name, definition_span, suggestion } => {

0 commit comments

Comments
 (0)