about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-10-29 17:14:44 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-10-29 17:14:44 +0900
commita3a3f4d8400069325bd35064cf1a2c7bf22d6991 (patch)
treef88db261023ee31addb370a44570577828f3a147 /compiler/rustc_resolve/src
parent33b55ac39fa633d0983fad014469e1036669bf28 (diff)
downloadrust-a3a3f4d8400069325bd35064cf1a2c7bf22d6991.tar.gz
rust-a3a3f4d8400069325bd35064cf1a2c7bf22d6991.zip
avoid unnecessary `&str` to `String` conversions
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late/diagnostics.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index 850f023b1c1..7d5fe32ee28 100644
--- a/compiler/rustc_resolve/src/late/diagnostics.rs
+++ b/compiler/rustc_resolve/src/late/diagnostics.rs
@@ -784,10 +784,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
             return false;
         }
         err.code(rustc_errors::error_code!(E0411));
-        err.span_label(
-            span,
-            "`Self` is only available in impls, traits, and type definitions".to_string(),
-        );
+        err.span_label(span, "`Self` is only available in impls, traits, and type definitions");
         if let Some(item_kind) = self.diagnostic_metadata.current_item {
             err.span_label(
                 item_kind.ident.span,