Skip to content

Commit

Permalink
avoid &str to String conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Jul 13, 2022
1 parent 5188bdb commit f65bf0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_resolve/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ impl<'a> Resolver<'a> {
E0401,
"can't use generic parameters from outer function",
);
err.span_label(span, "use of generic parameter from outer function".to_string());
err.span_label(span, "use of generic parameter from outer function");

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

0 comments on commit f65bf0b

Please sign in to comment.