diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-10-29 17:14:44 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-10-29 17:14:44 +0900 |
| commit | a3a3f4d8400069325bd35064cf1a2c7bf22d6991 (patch) | |
| tree | f88db261023ee31addb370a44570577828f3a147 /compiler/rustc_resolve/src | |
| parent | 33b55ac39fa633d0983fad014469e1036669bf28 (diff) | |
| download | rust-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.rs | 5 |
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, |
