about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-01-08 02:06:14 +0900
committerGitHub <noreply@github.com>2021-01-08 02:06:14 +0900
commitfd7f2443f1fed7433d8e887dad85b7616267eabf (patch)
treee0f704956bca2b96abdc1e3e21342b32f124b501 /compiler
parent6fb79245e8c7491469ce1904b585fabc1d3e6566 (diff)
parent7bc22e96d38828070ac7bf60dbc41e2455422af4 (diff)
downloadrust-fd7f2443f1fed7433d8e887dad85b7616267eabf.tar.gz
rust-fd7f2443f1fed7433d8e887dad85b7616267eabf.zip
Rollup merge of #80750 - GuillaumeGomez:cleanup-to_string, r=lzutao
Don't use to_string on Symbol in rustc_passes/check_attr.rs

Improve code from #80686.

r? ``@lzutao``
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 420c002c5fc..a6a61ffc5da 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -359,7 +359,7 @@ impl CheckAttrVisitor<'tcx> {
             return false;
         }
         let item_name = self.tcx.hir().name(hir_id);
-        if item_name.to_string() == doc_alias {
+        if &*item_name.as_str() == doc_alias {
             self.tcx
                 .sess
                 .struct_span_err(