diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-07-13 13:24:38 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-07-13 13:24:38 +0900 |
| commit | f65bf0b2bb1a99f73095c01a118f3c37d3ee614c (patch) | |
| tree | 8d5f22f3f06835deef6e8b5fcb8454fd8551aedc | |
| parent | 5188bdbccd6eaf0724d7237ce589454f3bec7026 (diff) | |
| download | rust-f65bf0b2bb1a99f73095c01a118f3c37d3ee614c.tar.gz rust-f65bf0b2bb1a99f73095c01a118f3c37d3ee614c.zip | |
avoid `&str` to `String` conversions
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 2851b08cd93..a820f700869 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -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 { @@ -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 } => { |
